?>
--EXPECTF--
-Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d
+Fatal error: Uncaught TypeError: Generator::throw() expects parameter 1 to be Throwable, object given in %s:%d
Stack trace:
-#0 [internal function]: gen()
-#1 %s(%d): Generator->throw(Object(stdClass))
-#2 {main}
+#0 %s(%d): Generator->throw(Object(stdClass))
+#1 {main}
thrown in %s on line %d
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_globals.h"
+#include "zend_closures_arginfo.h"
#define ZEND_CLOSURE_PRINT_NAME "Closure object"
}
/* }}} */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bindto, 0, 0, 1)
- ZEND_ARG_INFO(0, newthis)
- ZEND_ARG_INFO(0, newscope)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bind, 0, 0, 2)
- ZEND_ARG_INFO(0, closure)
- ZEND_ARG_INFO(0, newthis)
- ZEND_ARG_INFO(0, newscope)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_call, 0, 0, 1)
- ZEND_ARG_INFO(0, newthis)
- ZEND_ARG_VARIADIC_INFO(0, parameters)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_fromcallable, 0, 0, 1)
- ZEND_ARG_INFO(0, callable)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry closure_functions[] = {
- ZEND_ME(Closure, __construct, NULL, ZEND_ACC_PRIVATE)
- ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
- ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC)
- ZEND_ME(Closure, call, arginfo_closure_call, ZEND_ACC_PUBLIC)
- ZEND_ME(Closure, fromCallable, arginfo_closure_fromcallable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_ME(Closure, __construct, arginfo_class_Closure___construct, ZEND_ACC_PRIVATE)
+ ZEND_ME(Closure, bind, arginfo_class_Closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_MALIAS(Closure, bindTo, bind, arginfo_class_Closure_bindTo, ZEND_ACC_PUBLIC)
+ ZEND_ME(Closure, call, arginfo_class_Closure_call, ZEND_ACC_PUBLIC)
+ ZEND_ME(Closure, fromCallable, arginfo_class_Closure_fromCallable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
ZEND_FE_END
};
--- /dev/null
+<?php
+
+Class Closure
+{
+ private function __construct() {}
+
+ /** @return ?Closure */
+ static function bind(Closure $closure, ?object $newthis, $newscope = UNKNOWN) {}
+
+ /** @return ?Closure */
+ function bindTo(?object $newthis, $newscope = UNKNOWN) {}
+
+ function call(object $newthis, ...$parameters) {}
+
+ /** @return Closure */
+ function fromCallable(callable $callable) {}
+}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure_bind, 0, 0, 2)
+ ZEND_ARG_OBJ_INFO(0, closure, Closure, 0)
+ ZEND_ARG_TYPE_INFO(0, newthis, IS_OBJECT, 1)
+ ZEND_ARG_INFO(0, newscope)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure_bindTo, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, newthis, IS_OBJECT, 1)
+ ZEND_ARG_INFO(0, newscope)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure_call, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, newthis, IS_OBJECT, 0)
+ ZEND_ARG_VARIADIC_INFO(0, parameters)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure_fromCallable, 0, 0, 1)
+ ZEND_ARG_INFO(0, callable)
+ZEND_END_ARG_INFO()
#include "zend_vm.h"
#include "zend_dtrace.h"
#include "zend_smart_str.h"
+#include "zend_exceptions_arginfo.h"
ZEND_API zend_class_entry *zend_ce_throwable;
ZEND_API zend_class_entry *zend_ce_exception;
trace = zend_read_property_ex(base_ce, object, ZSTR_KNOWN(ZEND_STR_TRACE), 1, &rv);
if (Z_TYPE_P(trace) != IS_ARRAY) {
- RETURN_FALSE;
+ zend_type_error("trace is not an array");
+ return;
}
ZEND_HASH_FOREACH_NUM_KEY_VAL(Z_ARRVAL_P(trace), index, frame) {
if (Z_TYPE_P(frame) != IS_ARRAY) {
/** {{{ Throwable method definition */
static const zend_function_entry zend_funcs_throwable[] = {
- ZEND_ABSTRACT_ME(throwable, getMessage, NULL)
- ZEND_ABSTRACT_ME(throwable, getCode, NULL)
- ZEND_ABSTRACT_ME(throwable, getFile, NULL)
- ZEND_ABSTRACT_ME(throwable, getLine, NULL)
- ZEND_ABSTRACT_ME(throwable, getTrace, NULL)
- ZEND_ABSTRACT_ME(throwable, getPrevious, NULL)
- ZEND_ABSTRACT_ME(throwable, getTraceAsString, NULL)
- ZEND_ABSTRACT_ME(throwable, __toString, NULL)
+ ZEND_ABSTRACT_ME(throwable, getMessage, arginfo_class_Throwable_getMessage)
+ ZEND_ABSTRACT_ME(throwable, getCode, arginfo_class_Throwable_getCode)
+ ZEND_ABSTRACT_ME(throwable, getFile, arginfo_class_Throwable_getFile)
+ ZEND_ABSTRACT_ME(throwable, getLine, arginfo_class_Throwable_getLine)
+ ZEND_ABSTRACT_ME(throwable, getTrace, arginfo_class_Throwable_getTrace)
+ ZEND_ABSTRACT_ME(throwable, getPrevious, arginfo_class_Throwable_getPrevious)
+ ZEND_ABSTRACT_ME(throwable, getTraceAsString, arginfo_class_Throwable_getTraceAsString)
+ ZEND_ABSTRACT_ME(throwable, __toString, arginfo_class_Throwable___toString)
ZEND_FE_END
};
/* }}} */
* And never try to change the state of exceptions and never implement anything
* that gives the user anything to accomplish this.
*/
-ZEND_BEGIN_ARG_INFO_EX(arginfo_exception___construct, 0, 0, 0)
- ZEND_ARG_INFO(0, message)
- ZEND_ARG_INFO(0, code)
- ZEND_ARG_INFO(0, previous)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry default_exception_functions[] = {
- ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
- ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
- ZEND_ME(exception, __wakeup, NULL, ZEND_ACC_PUBLIC)
- ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getCode, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getFile, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getLine, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getPrevious, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
- ZEND_ME(exception, __toString, NULL, 0)
+ ZEND_ME(exception, __clone, arginfo_class_Exception___clone, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
+ ZEND_ME(exception, __construct, arginfo_class_Exception___construct, ZEND_ACC_PUBLIC)
+ ZEND_ME(exception, __wakeup, arginfo_class_Exception___wakeup, ZEND_ACC_PUBLIC)
+ ZEND_ME(exception, getMessage, arginfo_class_Exception_getMessage, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getCode, arginfo_class_Exception_getCode, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getFile, arginfo_class_Exception_getFile, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getLine, arginfo_class_Exception_getLine, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getTrace, arginfo_class_Exception_getTrace, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getPrevious, arginfo_class_Exception_getPrevious, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, getTraceAsString, arginfo_class_Exception_getTraceAsString, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(exception, __toString, arginfo_class_Exception___toString, 0)
ZEND_FE_END
};
-ZEND_BEGIN_ARG_INFO_EX(arginfo_error_exception___construct, 0, 0, 0)
- ZEND_ARG_INFO(0, message)
- ZEND_ARG_INFO(0, code)
- ZEND_ARG_INFO(0, severity)
- ZEND_ARG_INFO(0, filename)
- ZEND_ARG_INFO(0, lineno)
- ZEND_ARG_INFO(0, previous)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry error_exception_functions[] = {
- ZEND_ME(error_exception, __construct, arginfo_error_exception___construct, ZEND_ACC_PUBLIC)
- ZEND_ME(error_exception, getSeverity, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
+ ZEND_ME(error_exception, __construct, arginfo_class_ErrorException___construct, ZEND_ACC_PUBLIC)
+ ZEND_ME(error_exception, getSeverity, arginfo_class_ErrorException_getSeverity, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
ZEND_FE_END
};
/* }}} */
--- /dev/null
+<?php
+
+interface Throwable
+{
+ /** @return string */
+ function getMessage();
+
+ /** @return int */
+ function getCode();
+
+ /** @return string */
+ function getFile();
+
+ /** @return int */
+ function getLine();
+
+ /** @return array */
+ function getTrace();
+
+ /** @return ?Throwable */
+ function getPrevious();
+
+ /** @return string */
+ function getTraceAsString();
+
+ /** @return string */
+ function __toString();
+}
+
+class Exception implements Throwable
+{
+ final private function __clone() {}
+
+ function __construct(string $message = UNKNOWN, int $code = 0, ?Throwable $previous = null) {}
+
+ function __wakeup() {}
+
+ /** @return string */
+ final function getMessage() {}
+
+ /** @return int */
+ final function getCode() {}
+
+ /** @return string */
+ final function getFile() {}
+
+ /** @return int */
+ final function getLine() {}
+
+ /** @return array */
+ final function getTrace() {}
+
+ /** @return ?Throwable */
+ final function getPrevious() {}
+
+ /** @return string */
+ final function getTraceAsString() {}
+
+ /** @return string */
+ function __toString() {}
+}
+
+class ErrorException extends Exception
+{
+ function __construct(string $message = UNKNOWN, int $code = 0, int $severity = E_ERROR, string $filename = UNKNOWN, int $lineno = 0, ?Throwable $previous = null) {}
+
+ final function getSeverity() {}
+}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Throwable_getMessage, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Throwable_getCode arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable_getFile arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable_getLine arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable_getTrace arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable_getPrevious arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable_getTraceAsString arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Throwable___toString arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception___clone arginfo_class_Throwable_getMessage
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Exception___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, previous, Throwable, 1)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Exception___wakeup arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getMessage arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getCode arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getFile arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getLine arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getTrace arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getPrevious arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception_getTraceAsString arginfo_class_Throwable_getMessage
+
+#define arginfo_class_Exception___toString arginfo_class_Throwable_getMessage
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ErrorException___construct, 0, 0, 0)
+ ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, severity, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, lineno, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, previous, Throwable, 1)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ErrorException_getSeverity arginfo_class_Throwable_getMessage
#include "zend_exceptions.h"
#include "zend_generators.h"
#include "zend_closures.h"
+#include "zend_generators_arginfo.h"
ZEND_API zend_class_entry *zend_ce_generator;
ZEND_API zend_class_entry *zend_ce_ClosedGeneratorException;
zend_generator *generator;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL(exception)
+ Z_PARAM_OBJECT_OF_CLASS(exception, zend_ce_throwable);
ZEND_PARSE_PARAMETERS_END();
Z_TRY_ADDREF_P(exception);
}
/* }}} */
-ZEND_BEGIN_ARG_INFO(arginfo_generator_void, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_send, 0, 0, 1)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_generator_throw, 0, 0, 1)
- ZEND_ARG_INFO(0, exception)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry generator_functions[] = {
- ZEND_ME(Generator, rewind, arginfo_generator_void, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, valid, arginfo_generator_void, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, current, arginfo_generator_void, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, key, arginfo_generator_void, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, next, arginfo_generator_void, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, send, arginfo_generator_send, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, throw, arginfo_generator_throw, ZEND_ACC_PUBLIC)
- ZEND_ME(Generator, getReturn,arginfo_generator_void, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, rewind, arginfo_class_Generator_rewind, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, valid, arginfo_class_Generator_valid, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, current, arginfo_class_Generator_current, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, key, arginfo_class_Generator_key, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, next, arginfo_class_Generator_next, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, send, arginfo_class_Generator_send, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, throw, arginfo_class_Generator_throw, ZEND_ACC_PUBLIC)
+ ZEND_ME(Generator, getReturn,arginfo_class_Generator_getReturn, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
--- /dev/null
+<?php
+
+final class Generator implements Iterator
+{
+ function rewind(): void {}
+
+ function valid(): bool {}
+
+ function current() {}
+
+ function key() {}
+
+ function next(): void {}
+
+ function send($value) {}
+
+ function throw(Throwable $exception) {}
+
+ function getReturn() {}
+}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_rewind, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Generator_valid arginfo_class_Generator_rewind
+
+#define arginfo_class_Generator_current arginfo_class_Generator_rewind
+
+#define arginfo_class_Generator_key arginfo_class_Generator_rewind
+
+#define arginfo_class_Generator_next arginfo_class_Generator_rewind
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_send, 0, 0, 1)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Generator_throw, 0, 0, 1)
+ ZEND_ARG_OBJ_INFO(0, exception, Throwable, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Generator_getReturn arginfo_class_Generator_rewind
#include "zend_API.h"
#include "zend_interfaces.h"
#include "zend_exceptions.h"
+#include "zend_interfaces_arginfo.h"
ZEND_API zend_class_entry *zend_ce_traversable;
ZEND_API zend_class_entry *zend_ce_aggregate;
/* {{{ function tables */
static const zend_function_entry zend_funcs_aggregate[] = {
- ZEND_ABSTRACT_ME(iterator, getIterator, NULL)
+ ZEND_ABSTRACT_ME(iterator, getIterator, arginfo_class_IteratorAggregate_getIterator)
ZEND_FE_END
};
static const zend_function_entry zend_funcs_iterator[] = {
- ZEND_ABSTRACT_ME(iterator, current, NULL)
- ZEND_ABSTRACT_ME(iterator, next, NULL)
- ZEND_ABSTRACT_ME(iterator, key, NULL)
- ZEND_ABSTRACT_ME(iterator, valid, NULL)
- ZEND_ABSTRACT_ME(iterator, rewind, NULL)
+ ZEND_ABSTRACT_ME(iterator, current, arginfo_class_Iterator_current)
+ ZEND_ABSTRACT_ME(iterator, next, arginfo_class_Iterator_next)
+ ZEND_ABSTRACT_ME(iterator, key, arginfo_class_Iterator_key)
+ ZEND_ABSTRACT_ME(iterator, valid, arginfo_class_Iterator_valid)
+ ZEND_ABSTRACT_ME(iterator, rewind, arginfo_class_Iterator_rewind)
ZEND_FE_END
};
static const zend_function_entry *zend_funcs_traversable = NULL;
-ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset, 0, 0, 1)
- ZEND_ARG_INFO(0, offset)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_get, 0, 0, 1) /* actually this should be return by ref but atm cannot be */
- ZEND_ARG_INFO(0, offset)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_value, 0, 0, 2)
- ZEND_ARG_INFO(0, offset)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry zend_funcs_arrayaccess[] = {
- ZEND_ABSTRACT_ME(arrayaccess, offsetExists, arginfo_arrayaccess_offset)
- ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get)
- ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value)
- ZEND_ABSTRACT_ME(arrayaccess, offsetUnset, arginfo_arrayaccess_offset)
+ ZEND_ABSTRACT_ME(arrayaccess, offsetExists, arginfo_class_ArrayAccess_offsetExists)
+ ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_class_ArrayAccess_offsetGet)
+ ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_class_ArrayAccess_offsetSet)
+ ZEND_ABSTRACT_ME(arrayaccess, offsetUnset, arginfo_class_ArrayAccess_offsetUnset)
ZEND_FE_END
};
-ZEND_BEGIN_ARG_INFO(arginfo_serializable_serialize, 0)
- ZEND_ARG_INFO(0, serialized)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry zend_funcs_serializable[] = {
- ZEND_ABSTRACT_ME(serializable, serialize, NULL)
- ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
+ ZEND_ABSTRACT_ME(serializable, serialize, arginfo_class_Serializable_serialize)
+ ZEND_FENTRY(unserialize, NULL, arginfo_class_Serializable_unserialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT)
ZEND_FE_END
};
-ZEND_BEGIN_ARG_INFO(arginfo_countable_count, 0)
-ZEND_END_ARG_INFO()
-
static const zend_function_entry zend_funcs_countable[] = {
- ZEND_ABSTRACT_ME(Countable, count, arginfo_countable_count)
+ ZEND_ABSTRACT_ME(Countable, count, arginfo_class_Countable_count)
ZEND_FE_END
};
/* }}} */
--- /dev/null
+<?php
+
+interface Traversable {}
+
+interface IteratorAggregate extends Traversable
+{
+ /** @return Traversable */
+ function getIterator();
+}
+
+interface Iterator extends Traversable
+{
+ function current();
+
+ /** @return void */
+ function next();
+
+ function key();
+
+ /** @return bool */
+ function valid();
+
+ /** @return void */
+ function rewind();
+}
+
+interface ArrayAccess
+{
+ function offsetExists($offset);
+
+ /* actually this should be return by ref but atm cannot be */
+ function offsetGet($offset);
+
+ function offsetSet($offset, $value);
+
+ function offsetUnset($offset);
+}
+
+interface Serializable
+{
+ /** @return string */
+ function serialize();
+
+ function unserialize(string $serialized);
+}
+
+interface Countable
+{
+ /** @return int */
+ function count();
+}
--- /dev/null
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_IteratorAggregate_getIterator, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Iterator_current arginfo_class_IteratorAggregate_getIterator
+
+#define arginfo_class_Iterator_next arginfo_class_IteratorAggregate_getIterator
+
+#define arginfo_class_Iterator_key arginfo_class_IteratorAggregate_getIterator
+
+#define arginfo_class_Iterator_valid arginfo_class_IteratorAggregate_getIterator
+
+#define arginfo_class_Iterator_rewind arginfo_class_IteratorAggregate_getIterator
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetExists, 0, 0, 1)
+ ZEND_ARG_INFO(0, offset)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ArrayAccess_offsetGet arginfo_class_ArrayAccess_offsetExists
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ArrayAccess_offsetSet, 0, 0, 2)
+ ZEND_ARG_INFO(0, offset)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ArrayAccess_offsetUnset arginfo_class_ArrayAccess_offsetExists
+
+#define arginfo_class_Serializable_serialize arginfo_class_IteratorAggregate_getIterator
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Serializable_unserialize, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, serialized, IS_STRING, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_Countable_count arginfo_class_IteratorAggregate_getIterator
?>
--EXPECTF--
-Exception in %s:%d
-Stack trace:
-#0 {main}
-
-Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in %s on line %d
+Fatal error: Uncaught TypeError: trace is not an array in %s:%d
+%a
+ thrown in %s on line %d
}
"
-string(1607) "Class [ <internal:Core> class Exception implements Throwable ] {
+string(1969) "Class [ <internal:Core> class Exception implements Throwable ] {
- Constants [0] {
}
- Methods [11] {
Method [ <internal:Core> final private method __clone ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, ctor> public method __construct ] {
- Parameters [3] {
- Parameter #0 [ <optional> $message ]
- Parameter #1 [ <optional> $code ]
- Parameter #2 [ <optional> $previous ]
+ Parameter #0 [ <optional> string $message ]
+ Parameter #1 [ <optional> int $code ]
+ Parameter #2 [ <optional> ?Throwable $previous ]
}
}
Method [ <internal:Core> public method __wakeup ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getMessage ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getCode ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getFile ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getLine ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getTrace ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getPrevious ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> final public method getTraceAsString ] {
+
+ - Parameters [0] {
+ }
}
Method [ <internal:Core, prototype Throwable> public method __toString ] {
+
+ - Parameters [0] {
+ }
}
}
}