Fatal error: Uncaught TypeException: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
Stack trace:
-#0 %s(%d): foo()
+#0 %s(%d): foo(123)
#1 {main}
thrown in %sarray_type_hint_001.php on line 2
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): test()
+#0 %s(%d): test(Object(ClassName))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
Stack trace:
-#0 %s(%d): foo\test5()
+#0 %s(%d): foo\test5(Object(foo\bar))
#1 {main}
thrown in %sbug42802.php on line %d
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
Stack trace:
-#0 %s(%d): foobar\foo->bar()
+#0 %s(%d): foobar\foo->bar(Object(stdClass))
#1 {main}
thrown in %sbug43332_1.php on line 5
Fatal error: Uncaught TypeException: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): a()
+#0 %s(%d): a(NULL)
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): test()
+#0 %s(%d): test(Object(stdClass))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): foo\bar->__construct()
+#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): foo\bar->__construct()
+#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): foo->testFoo()
+#0 %s(%d): foo->testFoo(Object(stdClass))
#1 {main}
thrown in %s on line %d
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
Stack trace:
-#0 %s(%d): takes_int()
+#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
#2 {main}
thrown in %sweak_include_strict_2.inc on line 5
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
Stack trace:
-#0 %s(%d): function_declared_in_weak_mode()
+#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
thrown in %sstrict_call_weak_2.inc on line 5
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
Stack trace:
-#0 %s(%d): function_declared_in_weak_mode()
+#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
thrown in %sstrict_call_weak_explicit_2.inc on line 5
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
Stack trace:
-#0 %s(%d): takes_int()
+#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
#2 {main}
thrown in %sweak_include_strict_2.inc on line 5
Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d
Stack trace:
-#0 %s(%d): test(Array, Array)
+#0 %s(%d): test(Array, Array, 2)
#1 {main}
thrown in %s on line %d
const char *fname = zf->common.function_name->val;
const char *fsep;
const char *fclass;
- zval old_arg;
if (zf->common.scope) {
fsep = "::";
}
if (zf->common.type == ZEND_USER_FUNCTION) {
- if (arg) {
- ZVAL_COPY_VALUE(&old_arg, arg);
- ZVAL_UNDEF(arg);
- }
-
if (ptr && ptr->func && ZEND_USER_CODE(ptr->func->common.type)) {
zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d",
arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind,
} else {
zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind);
}
-
- if (arg) {
- ZVAL_COPY_VALUE(arg, &old_arg);
- }
} else {
zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind);
}
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): f()
+#0 %s(%d): f(Object(stdClass))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12
Stack trace:
-#0 %s(%d): FooBar->a()
+#0 %s(%d): FooBar->a(Object(Blort))
#1 {main}
thrown in %s on line 12
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): Foo->a()
+#0 %s(%d): Foo->a(Object(Foo))
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d
Stack trace:
-#0 %s(%d): Test::f1()
+#0 %s(%d): Test::f1(1)
#1 {main}
thrown in %s on line %d
Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d
Stack trace:
-#0 [internal function]: typehint(1)
+#0 [internal function]: typehint(1, 1)
#1 %s(%d): array_walk(Array, 'typehint')
#2 {main}
thrown in %s on line %d
--EXPECTF--
Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
Stack trace:
-#0 %s(%d): blah()
+#0 %s(%d): blah(Object(stdClass))
#1 {main}
thrown in %scatchable_error_001.php on line 5
Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9
Stack trace:
-#0 %s(%d): type_hint_foo()
+#0 %s(%d): type_hint_foo(Object(Bar))
#1 {main}
thrown in %s on line 9