mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Change argument error message format
Closes GH-5211
This commit is contained in:
parent
c7094d8926
commit
960318ed95
357 changed files with 1168 additions and 1158 deletions
|
@ -25,7 +25,7 @@ var_dump(constant("test const"));
|
|||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
TypeError: define() expects argument #1 ($constant_name) to be of type string, array given
|
||||
TypeError: define(): Argument #1 ($constant_name) must be of type string, array given
|
||||
|
||||
Notice: Constant TRUE already defined in %s on line %d
|
||||
bool(false)
|
||||
|
|
|
@ -46,8 +46,8 @@ string(3) "foo"
|
|||
|
||||
Warning: get_class() called without object from outside a class in %s on line %d
|
||||
bool(false)
|
||||
get_class() expects argument #1 ($object) to be of type object, string given
|
||||
get_class(): Argument #1 ($object) must be of type object, string given
|
||||
string(3) "foo"
|
||||
string(4) "foo2"
|
||||
get_class() expects argument #1 ($object) to be of type object, null given
|
||||
get_class(): Argument #1 ($object) must be of type object, null given
|
||||
Done
|
||||
|
|
|
@ -32,7 +32,7 @@ try {
|
|||
--EXPECTF--
|
||||
int(2)
|
||||
int(10)
|
||||
{closure}() expects argument #1 ($x) to be of type int, string given, called in %s on line %d
|
||||
{closure}(): Argument #1 ($x) must be of type int, string given, called in %s on line %d
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(20)
|
||||
|
@ -41,4 +41,4 @@ array(3) {
|
|||
[2]=>
|
||||
int(30)
|
||||
}
|
||||
{closure}() expects argument #2 ($args) to be of type ?int, string given, called in %s on line %d
|
||||
{closure}(): Argument #2 ($args) must be of type ?int, string given, called in %s on line %d
|
||||
|
|
|
@ -12,4 +12,4 @@ try {
|
|||
?>
|
||||
--EXPECTF--
|
||||
Warning: Undefined variable: nonesuchvar in %s on line %d
|
||||
array_walk() expects argument #2 ($funcname) to be a valid callback, first array member is not a valid class name or object
|
||||
array_walk(): Argument #2 ($funcname) must be a valid callback, first array member is not a valid class name or object
|
||||
|
|
|
@ -20,7 +20,7 @@ test($obj);
|
|||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: test() expects argument #1 ($object) to be of type OtherClassName, ClassName given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: test(): Argument #1 ($object) must be of type OtherClassName, ClassName given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): test(Object(ClassName))
|
||||
#1 {main}
|
||||
|
|
|
@ -37,7 +37,7 @@ ok
|
|||
ok
|
||||
ok
|
||||
|
||||
Fatal error: Uncaught TypeError: foo\test5() expects argument #1 ($bar) to be of type bar, foo\bar given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo\test5(): Argument #1 ($bar) must be of type bar, foo\bar given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo\test5(Object(foo\bar))
|
||||
#1 {main}
|
||||
|
|
|
@ -12,7 +12,7 @@ $foo = new foo;
|
|||
$foo->bar($foo); // Ok!
|
||||
$foo->bar(new \stdclass); // Error, ok!
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: foobar\foo::bar() expects argument #1 ($a) to be of type foobar\foo, stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
|
||||
Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foobar\foo->bar(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -54,4 +54,4 @@ string(1) "y"
|
|||
ok
|
||||
__callstatic:
|
||||
string(3) "www"
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active
|
||||
|
|
|
@ -52,5 +52,5 @@ string(1) "y"
|
|||
__call:
|
||||
string(1) "y"
|
||||
ok
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, class 'bar' does not have a method 'www'
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, class 'bar' does not have a method 'www'
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active
|
||||
|
|
|
@ -58,5 +58,5 @@ $c->func('This should work!');
|
|||
--EXPECT--
|
||||
string(27) "A::func2: This should work!"
|
||||
string(27) "A::func3: This should work!"
|
||||
call_user_func_array() expects argument #1 ($function) to be a valid callback, cannot access private method A::func22()
|
||||
call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'A' does not have a method 'inexistent'
|
||||
call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method A::func22()
|
||||
call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'A' does not have a method 'inexistent'
|
||||
|
|
|
@ -52,4 +52,4 @@ $c->func('This should work!');
|
|||
--EXPECT--
|
||||
string(27) "B::func2: This should work!"
|
||||
string(27) "B::func3: This should work!"
|
||||
call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'B' does not have a method 'inexistent'
|
||||
call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent'
|
||||
|
|
|
@ -11,5 +11,5 @@ $args = array_fill(0, 64 * 1024 - 64, 0);
|
|||
call_user_func_array(function(&$a) {}, $args);
|
||||
echo strval("okey");
|
||||
--EXPECTF--
|
||||
Warning: {closure}() expects argument #1 ($a) to be passed by reference, value given in %s on line %d
|
||||
Warning: {closure}(): Argument #1 ($a) must be passed by reference, value given in %s on line %d
|
||||
okey
|
||||
|
|
|
@ -32,7 +32,7 @@ array(1) {
|
|||
int(1)
|
||||
}
|
||||
|
||||
Fatal error: Uncaught TypeError: a() expects argument #1 ($a) to be of type array, null given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: a(): Argument #1 ($a) must be of type array, null given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): a(NULL)
|
||||
#1 {main}
|
||||
|
|
|
@ -20,6 +20,6 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
array_map() expects argument #1 ($callback) to be a valid callback, function '%n' not found or invalid function name
|
||||
array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i' not found or invalid function name
|
||||
array_map() expects argument #1 ($callback) to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name
|
||||
array_map(): Argument #1 ($callback) must be a valid callback, function '%n' not found or invalid function name
|
||||
array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i' not found or invalid function name
|
||||
array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name
|
||||
|
|
|
@ -13,4 +13,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
array_map() expects argument #1 ($callback) to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
|
||||
array_map(): Argument #1 ($callback) must be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
|
||||
|
|
|
@ -17,10 +17,10 @@ new class {
|
|||
};
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
object(class@anonymous)#1 (0) {
|
||||
}
|
||||
|
||||
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
object(class@anonymous)#1 (0) {
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ new class {
|
|||
};
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
int(0)
|
||||
|
||||
Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: ref(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
int(0)
|
||||
|
|
|
@ -16,7 +16,7 @@ takes_int(log(tan(3.14)));
|
|||
float(NAN)
|
||||
bool(true)
|
||||
|
||||
Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($int) to be of type int, float given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($int) must be of type int, float given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(9): takes_int(NAN)
|
||||
#1 {main}
|
||||
|
|
|
@ -12,7 +12,7 @@ set_error_handler(function ($type, $msg) {
|
|||
call_user_func(function (array &$ref) {var_dump("xxx");}, 'not_an_array_variable');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: Foo\{closure}() expects argument #1 ($ref) to be passed by reference, value given in %s:%d
|
||||
Fatal error: Uncaught Exception: Foo\{closure}(): Argument #1 ($ref) must be passed by reference, value given in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: Foo\{closure}(%s)
|
||||
#1 %sbug74164.php(%d): call_user_func(%s)
|
||||
|
|
|
@ -37,5 +37,5 @@ namespace testing {
|
|||
?>
|
||||
--EXPECT--
|
||||
string(6) "foobar"
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access private method testing\foo::priv()
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, cannot access protected method testing\foo::prot()
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access private method testing\foo::priv()
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, cannot access protected method testing\foo::prot()
|
||||
|
|
|
@ -31,11 +31,11 @@ try {
|
|||
?>
|
||||
--EXPECTF--
|
||||
string(3) "foo"
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, class 'foo' not found
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, class '' not found
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, class 'foo' not found
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, class '' not found
|
||||
|
||||
Warning: Undefined variable: foo in %s on line %d
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object
|
||||
|
||||
Warning: Undefined variable: foo in %s on line %d
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object
|
||||
|
|
|
@ -21,8 +21,8 @@ var_dump($y);
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
int(42)
|
||||
|
||||
Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: Foo\bar(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
int(42)
|
||||
|
|
|
@ -15,6 +15,6 @@ Notice: Undefined offset: 0 in %s on line %d
|
|||
|
||||
Warning: Trying to access array offset on value of type null in %s on line %d
|
||||
|
||||
Warning: foo() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
|
||||
Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
|
|
|
@ -25,30 +25,30 @@ var_dump($i, $j);
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
|
||||
|
||||
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
int(0)
|
||||
int(0)
|
||||
|
||||
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
|
||||
|
||||
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
int(0)
|
||||
int(0)
|
||||
|
||||
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
|
||||
|
||||
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
int(0)
|
||||
int(0)
|
||||
|
||||
Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #1 ($ref1) must be passed by reference, value given in %s on line %d
|
||||
|
||||
Warning: test() expects argument #2 ($ref2) to be passed by reference, value given in %s on line %d
|
||||
Warning: test(): Argument #2 ($ref2) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
int(0)
|
||||
int(0)
|
||||
|
|
|
@ -10,8 +10,8 @@ var_dump(\call_user_func('sort', []));
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
|
||||
Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
|
||||
Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
|
||||
Warning: sort(): Argument #1 ($arg) must be passed by reference, value given in %s on line %d
|
||||
bool(true)
|
||||
|
|
|
@ -15,4 +15,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
call_user_func_array() expects argument #2 ($args) to be of type array, null given
|
||||
call_user_func_array(): Argument #2 ($args) must be of type array, null given
|
||||
|
|
|
@ -30,7 +30,7 @@ NULL
|
|||
Warning: Undefined variable: y in %s on line %d
|
||||
Exception: Too few arguments to function {closure}(), 0 passed in %s on line %d and exactly 1 expected
|
||||
|
||||
Fatal error: Uncaught TypeError: test() expects argument #1 ($a) to be of type Closure, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: test(): Argument #1 ($a) must be of type Closure, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): test(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -33,6 +33,6 @@ try {
|
|||
echo "Exception: " . $e->getMessage() . "\n";
|
||||
}
|
||||
--EXPECTF--
|
||||
Exception: {closure}() expects argument #1 ($a) to be of type A, B given, called in %s on line %d
|
||||
Exception: {closure}() expects argument #1 ($a) to be of type A, B given
|
||||
Exception: {closure}() expects argument #1 ($a) to be of type A, B given
|
||||
Exception: {closure}(): Argument #1 ($a) must be of type A, B given, called in %s on line %d
|
||||
Exception: {closure}(): Argument #1 ($a) must be of type A, B given
|
||||
Exception: {closure}(): Argument #1 ($a) must be of type A, B given
|
||||
|
|
|
@ -28,7 +28,7 @@ Error: Cannot call abstract method C::foo() in %s:%d
|
|||
Stack trace:
|
||||
#0 {main}
|
||||
|
||||
TypeError: foo() expects argument #1 ($x) to be of type callable, string given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: foo(): Argument #1 ($x) must be of type callable, string given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo('C::foo')
|
||||
#1 {main}
|
||||
|
|
|
@ -9,7 +9,7 @@ set_exception_handler(array("", ""));
|
|||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d
|
||||
Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d
|
||||
|
||||
Warning: set_exception_handler() expects argument #1 ($exception_handler) to be a valid callback in %s on line %d
|
||||
Warning: set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback in %s on line %d
|
||||
Done
|
||||
|
|
|
@ -49,6 +49,6 @@ Too few arguments to function bar(), 1 passed in %s and exactly 2 expected
|
|||
ArgumentCountError
|
||||
Too few arguments to function bat(), 1 passed in %s and exactly 2 expected
|
||||
TypeError
|
||||
bat() expects argument #1 ($foo) to be of type int, string given, called in %s on line %d
|
||||
bat(): Argument #1 ($foo) must be of type int, string given, called in %s on line %d
|
||||
TypeError
|
||||
bat() expects argument #2 ($bar) to be of type string, int given, called in %s on line %d
|
||||
bat(): Argument #2 ($bar) must be of type string, int given, called in %s on line %d
|
||||
|
|
|
@ -18,5 +18,5 @@ try {
|
|||
}
|
||||
|
||||
--EXPECTF--
|
||||
foo() expects argument #2 ($bar) to be of type int, array given, called in %s on line %d
|
||||
foo() expects argument #4 ($bar) to be of type int, array given, called in %s on line %d
|
||||
foo(): Argument #2 ($bar) must be of type int, array given, called in %s on line %d
|
||||
foo(): Argument #4 ($bar) must be of type int, array given, called in %s on line %d
|
||||
|
|
|
@ -6,7 +6,7 @@ function gen(array $a) { yield; }
|
|||
gen(42);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: gen(): Argument #1 ($a) must be of type array, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %sgenerator_with_type_check.php(3): gen(42)
|
||||
#1 {main}
|
||||
|
|
|
@ -18,5 +18,5 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d
|
||||
gen() expects argument #1 ($a) to be of type array, int given, called in %s on line %d
|
||||
gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d
|
||||
gen(): Argument #1 ($a) must be of type array, int given, called in %s on line %d
|
||||
|
|
|
@ -12,7 +12,7 @@ $gen->throw(new stdClass);
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: Generator::throw() expects argument #1 ($exception) to be of type Throwable, object given in %s:%d
|
||||
Fatal error: Uncaught TypeError: Generator::throw(): Argument #1 ($exception) must be of type Throwable, object given in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): Generator->throw(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -10,4 +10,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
|
||||
call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object
|
||||
|
|
|
@ -18,7 +18,7 @@ new bar(new \stdclass);
|
|||
--EXPECTF--
|
||||
NULL
|
||||
|
||||
Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?array, object given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?array, object given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo\bar->__construct(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -30,7 +30,7 @@ object(foo\test)#%d (0) {
|
|||
}
|
||||
NULL
|
||||
|
||||
Fatal error: Uncaught TypeError: foo\bar::__construct() expects argument #1 ($x) to be of type ?foo\foo, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo\bar::__construct(): Argument #1 ($x) must be of type ?foo\foo, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo\bar->__construct(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -11,7 +11,7 @@ $one = new One();
|
|||
$one->a(new One());
|
||||
$one->a(123);
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: One::a() expects argument #1 ($obj) to be of type object, int given, called in %s:%d
|
||||
Fatal error: Uncaught TypeError: One::a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(9): One->a(123)
|
||||
#1 {main}
|
||||
|
|
|
@ -9,7 +9,7 @@ function a(object $obj) {}
|
|||
a(new A());
|
||||
a(123);
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: a() expects argument #1 ($obj) to be of type object, int given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: a(): Argument #1 ($obj) must be of type object, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(7): a(123)
|
||||
#1 {main}
|
||||
|
|
|
@ -36,7 +36,7 @@ object(bar)#%d (0) {
|
|||
object(baz)#%d (0) {
|
||||
}
|
||||
|
||||
Fatal error: Uncaught TypeError: foo::testFoo() expects argument #1 ($obj) to be of type foo, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo::testFoo(): Argument #1 ($obj) must be of type foo, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo->testFoo(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -39,5 +39,5 @@ try {
|
|||
?>
|
||||
--EXPECTF--
|
||||
Return value of C::test1() must be of type int, string returned
|
||||
C::test2() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d
|
||||
C::test3() expects argument #1 ($arg) to be of type int, string given, called in %s on line %d
|
||||
C::test2(): Argument #1 ($arg) must be of type int, string given, called in %s on line %d
|
||||
C::test3(): Argument #1 ($arg) must be of type int, string given, called in %s on line %d
|
||||
|
|
|
@ -12,7 +12,7 @@ foo(123);
|
|||
--EXPECTF--
|
||||
3
|
||||
|
||||
Fatal error: Uncaught TypeError: foo() expects argument #1 ($a) to be of type array, int given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo(): Argument #1 ($a) must be of type array, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo(123)
|
||||
#1 {main}
|
||||
|
|
|
@ -29,7 +29,7 @@ array(2) {
|
|||
string(3) "foo"
|
||||
}
|
||||
|
||||
Fatal error: Uncaught TypeError: foo() expects argument #1 ($bar) to be of type callable, array given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo(): Argument #1 ($bar) must be of type callable, array given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo(Array)
|
||||
#1 {main}
|
||||
|
|
|
@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc';
|
|||
// calls within that file should stay strict, despite being included by weak file
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($x) must be of type int, float given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): takes_int(1)
|
||||
#1 %s(%d): require('%s')
|
||||
|
|
|
@ -8,7 +8,7 @@ foo(null);
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: foo() expects argument #1 ($ex) to be of type bar, null given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: foo(): Argument #1 ($ex) must be of type bar, null given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): foo(NULL)
|
||||
#1 {main}
|
||||
|
|
|
@ -28,8 +28,8 @@ try {
|
|||
?>
|
||||
--EXPECT--
|
||||
*** Trying Ord With Integer
|
||||
*** Caught ord() expects argument #1 ($character) to be of type string, int given
|
||||
*** Caught ord(): Argument #1 ($character) must be of type string, int given
|
||||
*** Trying Array Map With Invalid Callback
|
||||
*** Caught array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object
|
||||
*** Caught array_map(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object
|
||||
*** Trying Strlen With Float
|
||||
*** Caught strlen() expects argument #1 ($str) to be of type string, float given
|
||||
*** Caught strlen(): Argument #1 ($str) must be of type string, float given
|
||||
|
|
|
@ -44,4 +44,4 @@ object(ArrayIterator)#1 (1) {
|
|||
int(3)
|
||||
}
|
||||
}
|
||||
test() expects argument #1 ($iterable) to be of type iterable, int given, called in %s on line %d
|
||||
test(): Argument #1 ($iterable) must be of type iterable, int given, called in %s on line %d
|
||||
|
|
|
@ -78,16 +78,16 @@ E_NOTICE: A non well formed numeric value encountered on line %d
|
|||
int(1)
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(%d)
|
||||
int(%d)
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
int(1)
|
||||
|
@ -96,22 +96,22 @@ int(1)
|
|||
int(0)
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' type:
|
||||
|
||||
|
@ -132,10 +132,10 @@ E_NOTICE: A non well formed numeric value encountered on line %d
|
|||
float(1)
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(%d)
|
||||
float(%s)
|
||||
|
@ -150,22 +150,22 @@ float(1)
|
|||
float(0)
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' type:
|
||||
|
||||
|
@ -203,22 +203,22 @@ string(1) "1"
|
|||
string(0) ""
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#%s (0) {
|
||||
}
|
||||
string(6) "foobar"
|
||||
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' type:
|
||||
|
||||
|
@ -256,21 +256,21 @@ bool(true)
|
|||
bool(false)
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#%s (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(%d) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d
|
||||
|
||||
Done
|
||||
|
|
|
@ -96,9 +96,9 @@ float(10.7)
|
|||
Testing string add val
|
||||
string(14) "this is a test"
|
||||
Testing int with default null constant
|
||||
int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d
|
||||
int_val_default_null(): Argument #1 ($a) must be of type int, null given, called in %s on line %d
|
||||
Testing int with null null constant
|
||||
int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d
|
||||
int_val_default_null(): Argument #1 ($a) must be of type int, null given, called in %s on line %d
|
||||
Testing nullable int with default null constant
|
||||
NULL
|
||||
Testing nullable int with null null constant
|
||||
|
|
|
@ -13,7 +13,7 @@ var_dump(int_val());
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: int_val() expects argument #1 ($a) to be of type int, string given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: int_val(): Argument #1 ($a) must be of type int, string given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): int_val()
|
||||
#1 {main}
|
||||
|
|
|
@ -27,13 +27,13 @@ echo PHP_EOL . "Done";
|
|||
?>
|
||||
--EXPECTF--
|
||||
Testing int:
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
|
||||
Testing float:
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
|
||||
Testing string:
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d
|
||||
Testing bool:
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d
|
||||
Testing int nullable:
|
||||
NULL
|
||||
Testing float nullable:
|
||||
|
|
|
@ -60,52 +60,52 @@ Testing 'int' type:
|
|||
int(1)
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(2147483647)
|
||||
int(2147483647)
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' type:
|
||||
|
||||
|
@ -113,7 +113,7 @@ Testing 'float' type:
|
|||
float(1)
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
float(1)
|
||||
|
@ -122,13 +122,13 @@ float(1)
|
|||
float(1.5)
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(2147483647)
|
||||
float(2147483647)
|
||||
|
@ -137,42 +137,42 @@ float(2147483647)
|
|||
float(NAN)
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "1"
|
||||
string(1) "1"
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
string(2) "1a"
|
||||
|
@ -184,63 +184,63 @@ string(1) "a"
|
|||
string(0) ""
|
||||
|
||||
*** Trying int(2147483647)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(2147483647)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
bool(true)
|
||||
|
@ -249,21 +249,21 @@ bool(true)
|
|||
bool(false)
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d
|
||||
|
||||
Done
|
||||
|
|
|
@ -60,52 +60,52 @@ Testing 'int' type:
|
|||
int(1)
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(9223372036854775807)
|
||||
int(9223372036854775807)
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' type:
|
||||
|
||||
|
@ -113,7 +113,7 @@ Testing 'float' type:
|
|||
float(1)
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
float(1)
|
||||
|
@ -122,13 +122,13 @@ float(1)
|
|||
float(1.5)
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(9223372036854775807)
|
||||
float(9.223372036854776E+18)
|
||||
|
@ -137,42 +137,42 @@ float(9.223372036854776E+18)
|
|||
float(NAN)
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "1"
|
||||
string(1) "1"
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
string(2) "1a"
|
||||
|
@ -184,63 +184,63 @@ string(1) "a"
|
|||
string(0) ""
|
||||
|
||||
*** Trying int(9223372036854775807)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying bool(false)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying int(1)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "1"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying float(1)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying float(1.5)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying string(2) "1a"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(1) "a"
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying string(0) ""
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying int(9223372036854775807)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d
|
||||
|
||||
*** Trying float(NAN)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying bool(true)
|
||||
bool(true)
|
||||
|
@ -249,21 +249,21 @@ bool(true)
|
|||
bool(false)
|
||||
|
||||
*** Trying NULL
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d
|
||||
|
||||
*** Trying array(0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d
|
||||
|
||||
*** Trying object(stdClass)#5 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying object(Stringable)#6 (0) {
|
||||
}
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource(5) of type (stream)
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d
|
||||
|
||||
Done
|
||||
|
|
|
@ -57,28 +57,28 @@ Testing 'int' type:
|
|||
int(1)
|
||||
|
||||
*** Trying float value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d
|
||||
|
||||
*** Trying string value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d
|
||||
|
||||
*** Trying true value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying false value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d
|
||||
|
||||
*** Trying null value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d
|
||||
|
||||
*** Trying array value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, array given, called in %s on line %d
|
||||
|
||||
*** Trying object value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource value
|
||||
*** Caught {closure}() expects argument #1 ($i) to be of type int, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($i) must be of type int, resource given, called in %s on line %d
|
||||
|
||||
Testing 'float' type:
|
||||
|
||||
|
@ -89,65 +89,65 @@ float(1)
|
|||
float(1)
|
||||
|
||||
*** Trying string value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d
|
||||
|
||||
*** Trying true value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying false value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d
|
||||
|
||||
*** Trying null value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d
|
||||
|
||||
*** Trying array value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, array given, called in %s on line %d
|
||||
|
||||
*** Trying object value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource value
|
||||
*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($f) must be of type float, resource given, called in %s on line %d
|
||||
|
||||
Testing 'string' type:
|
||||
|
||||
*** Trying integer value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, int given, called in %s on line %d
|
||||
|
||||
*** Trying float value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d
|
||||
|
||||
*** Trying string value
|
||||
string(1) "1"
|
||||
|
||||
*** Trying true value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying false value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d
|
||||
|
||||
*** Trying null value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d
|
||||
|
||||
*** Trying array value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, array given, called in %s on line %d
|
||||
|
||||
*** Trying object value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource value
|
||||
*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($s) must be of type string, resource given, called in %s on line %d
|
||||
|
||||
Testing 'bool' type:
|
||||
|
||||
*** Trying integer value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, int given, called in %s on line %d
|
||||
|
||||
*** Trying float value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, float given, called in %s on line %d
|
||||
|
||||
*** Trying string value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, string given, called in %s on line %d
|
||||
|
||||
*** Trying true value
|
||||
bool(true)
|
||||
|
@ -156,15 +156,15 @@ bool(true)
|
|||
bool(false)
|
||||
|
||||
*** Trying null value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, null given, called in %s on line %d
|
||||
|
||||
*** Trying array value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, array given, called in %s on line %d
|
||||
|
||||
*** Trying object value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, object given, called in %s on line %d
|
||||
|
||||
*** Trying resource value
|
||||
*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
|
||||
*** Caught {closure}(): Argument #1 ($b) must be of type bool, resource given, called in %s on line %d
|
||||
|
||||
Done
|
||||
|
|
|
@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc';
|
|||
function_declared_in_weak_mode(1.0);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: function_declared_in_weak_mode(): Argument #1 ($x) must be of type int, float given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): function_declared_in_weak_mode(1)
|
||||
#1 {main}
|
||||
|
|
|
@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc';
|
|||
function_declared_in_weak_mode(1.0);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: function_declared_in_weak_mode() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: function_declared_in_weak_mode(): Argument #1 ($x) must be of type int, float given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): function_declared_in_weak_mode(1)
|
||||
#1 {main}
|
||||
|
|
|
@ -68,7 +68,7 @@ int(42)
|
|||
int(42)
|
||||
int(42)
|
||||
Cannot assign stdClass to property Test::$prop of type X|Y|Z|int
|
||||
Test::method() expects argument #1 ($arg) to be of type X|Y|Z|int, stdClass given, called in %s on line %d
|
||||
Test::method(): Argument #1 ($arg) must be of type X|Y|Z|int, stdClass given, called in %s on line %d
|
||||
object(X)#4 (0) {
|
||||
}
|
||||
object(X)#6 (0) {
|
||||
|
|
|
@ -37,7 +37,7 @@ function test(string $type, array $values) {
|
|||
} catch (TypeError $e) {
|
||||
$msg = $e->getMessage();
|
||||
$msg = strstr($msg, ', called in', true);
|
||||
$msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg);
|
||||
$msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg);
|
||||
echo $msg;
|
||||
}
|
||||
echo "\n";
|
||||
|
@ -70,86 +70,86 @@ Type int|float:
|
|||
42 => 42
|
||||
42.0 => 42.0
|
||||
INF => INF
|
||||
"42" => Argument ... ($arg) to be of type int|float, string given
|
||||
"42.0" => Argument ... ($arg) to be of type int|float, string given
|
||||
"42x" => Argument ... ($arg) to be of type int|float, string given
|
||||
"x" => Argument ... ($arg) to be of type int|float, string given
|
||||
"" => Argument ... ($arg) to be of type int|float, string given
|
||||
true => Argument ... ($arg) to be of type int|float, bool given
|
||||
false => Argument ... ($arg) to be of type int|float, bool given
|
||||
null => Argument ... ($arg) to be of type int|float, null given
|
||||
[] => Argument ... ($arg) to be of type int|float, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float, object given
|
||||
"42" => Argument ... must be of type int|float, string given
|
||||
"42.0" => Argument ... must be of type int|float, string given
|
||||
"42x" => Argument ... must be of type int|float, string given
|
||||
"x" => Argument ... must be of type int|float, string given
|
||||
"" => Argument ... must be of type int|float, string given
|
||||
true => Argument ... must be of type int|float, bool given
|
||||
false => Argument ... must be of type int|float, bool given
|
||||
null => Argument ... must be of type int|float, null given
|
||||
[] => Argument ... must be of type int|float, array given
|
||||
new stdClass => Argument ... must be of type int|float, object given
|
||||
new WithToString => Argument ... must be of type int|float, object given
|
||||
|
||||
Type int|float|false:
|
||||
42 => 42
|
||||
42.0 => 42.0
|
||||
INF => INF
|
||||
"42" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"42.0" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"42x" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"x" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
true => Argument ... ($arg) to be of type int|float|false, bool given
|
||||
"42" => Argument ... must be of type int|float|false, string given
|
||||
"42.0" => Argument ... must be of type int|float|false, string given
|
||||
"42x" => Argument ... must be of type int|float|false, string given
|
||||
"x" => Argument ... must be of type int|float|false, string given
|
||||
"" => Argument ... must be of type int|float|false, string given
|
||||
true => Argument ... must be of type int|float|false, bool given
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|float|false, null given
|
||||
[] => Argument ... ($arg) to be of type int|float|false, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float|false, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float|false, object given
|
||||
null => Argument ... must be of type int|float|false, null given
|
||||
[] => Argument ... must be of type int|float|false, array given
|
||||
new stdClass => Argument ... must be of type int|float|false, object given
|
||||
new WithToString => Argument ... must be of type int|float|false, object given
|
||||
|
||||
Type int|float|bool:
|
||||
42 => 42
|
||||
42.0 => 42.0
|
||||
INF => INF
|
||||
"42" => Argument ... ($arg) to be of type int|float|bool, string given
|
||||
"42.0" => Argument ... ($arg) to be of type int|float|bool, string given
|
||||
"42x" => Argument ... ($arg) to be of type int|float|bool, string given
|
||||
"x" => Argument ... ($arg) to be of type int|float|bool, string given
|
||||
"" => Argument ... ($arg) to be of type int|float|bool, string given
|
||||
"42" => Argument ... must be of type int|float|bool, string given
|
||||
"42.0" => Argument ... must be of type int|float|bool, string given
|
||||
"42x" => Argument ... must be of type int|float|bool, string given
|
||||
"x" => Argument ... must be of type int|float|bool, string given
|
||||
"" => Argument ... must be of type int|float|bool, string given
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|float|bool, null given
|
||||
[] => Argument ... ($arg) to be of type int|float|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float|bool, object given
|
||||
null => Argument ... must be of type int|float|bool, null given
|
||||
[] => Argument ... must be of type int|float|bool, array given
|
||||
new stdClass => Argument ... must be of type int|float|bool, object given
|
||||
new WithToString => Argument ... must be of type int|float|bool, object given
|
||||
|
||||
Type int|bool:
|
||||
42 => 42
|
||||
42.0 => Argument ... ($arg) to be of type int|bool, float given
|
||||
INF => Argument ... ($arg) to be of type int|bool, float given
|
||||
"42" => Argument ... ($arg) to be of type int|bool, string given
|
||||
"42.0" => Argument ... ($arg) to be of type int|bool, string given
|
||||
"42x" => Argument ... ($arg) to be of type int|bool, string given
|
||||
"x" => Argument ... ($arg) to be of type int|bool, string given
|
||||
"" => Argument ... ($arg) to be of type int|bool, string given
|
||||
42.0 => Argument ... must be of type int|bool, float given
|
||||
INF => Argument ... must be of type int|bool, float given
|
||||
"42" => Argument ... must be of type int|bool, string given
|
||||
"42.0" => Argument ... must be of type int|bool, string given
|
||||
"42x" => Argument ... must be of type int|bool, string given
|
||||
"x" => Argument ... must be of type int|bool, string given
|
||||
"" => Argument ... must be of type int|bool, string given
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|bool, null given
|
||||
[] => Argument ... ($arg) to be of type int|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|bool, object given
|
||||
null => Argument ... must be of type int|bool, null given
|
||||
[] => Argument ... must be of type int|bool, array given
|
||||
new stdClass => Argument ... must be of type int|bool, object given
|
||||
new WithToString => Argument ... must be of type int|bool, object given
|
||||
|
||||
Type int|string|null:
|
||||
42 => 42
|
||||
42.0 => Argument ... ($arg) to be of type string|int|null, float given
|
||||
INF => Argument ... ($arg) to be of type string|int|null, float given
|
||||
42.0 => Argument ... must be of type string|int|null, float given
|
||||
INF => Argument ... must be of type string|int|null, float given
|
||||
"42" => "42"
|
||||
"42.0" => "42.0"
|
||||
"42x" => "42x"
|
||||
"x" => "x"
|
||||
"" => ""
|
||||
true => Argument ... ($arg) to be of type string|int|null, bool given
|
||||
false => Argument ... ($arg) to be of type string|int|null, bool given
|
||||
true => Argument ... must be of type string|int|null, bool given
|
||||
false => Argument ... must be of type string|int|null, bool given
|
||||
null => null
|
||||
[] => Argument ... ($arg) to be of type string|int|null, array given
|
||||
new stdClass => Argument ... ($arg) to be of type string|int|null, object given
|
||||
new WithToString => Argument ... ($arg) to be of type string|int|null, object given
|
||||
[] => Argument ... must be of type string|int|null, array given
|
||||
new stdClass => Argument ... must be of type string|int|null, object given
|
||||
new WithToString => Argument ... must be of type string|int|null, object given
|
||||
|
||||
Type string|bool:
|
||||
42 => Argument ... ($arg) to be of type string|bool, int given
|
||||
42.0 => Argument ... ($arg) to be of type string|bool, float given
|
||||
INF => Argument ... ($arg) to be of type string|bool, float given
|
||||
42 => Argument ... must be of type string|bool, int given
|
||||
42.0 => Argument ... must be of type string|bool, float given
|
||||
INF => Argument ... must be of type string|bool, float given
|
||||
"42" => "42"
|
||||
"42.0" => "42.0"
|
||||
"42x" => "42x"
|
||||
|
@ -157,55 +157,55 @@ INF => Argument ... ($arg) to be of type string|bool, float given
|
|||
"" => ""
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type string|bool, null given
|
||||
[] => Argument ... ($arg) to be of type string|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type string|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type string|bool, object given
|
||||
null => Argument ... must be of type string|bool, null given
|
||||
[] => Argument ... must be of type string|bool, array given
|
||||
new stdClass => Argument ... must be of type string|bool, object given
|
||||
new WithToString => Argument ... must be of type string|bool, object given
|
||||
|
||||
Type float|array:
|
||||
42 => 42.0
|
||||
42.0 => 42.0
|
||||
INF => INF
|
||||
"42" => Argument ... ($arg) to be of type array|float, string given
|
||||
"42.0" => Argument ... ($arg) to be of type array|float, string given
|
||||
"42x" => Argument ... ($arg) to be of type array|float, string given
|
||||
"x" => Argument ... ($arg) to be of type array|float, string given
|
||||
"" => Argument ... ($arg) to be of type array|float, string given
|
||||
true => Argument ... ($arg) to be of type array|float, bool given
|
||||
false => Argument ... ($arg) to be of type array|float, bool given
|
||||
null => Argument ... ($arg) to be of type array|float, null given
|
||||
"42" => Argument ... must be of type array|float, string given
|
||||
"42.0" => Argument ... must be of type array|float, string given
|
||||
"42x" => Argument ... must be of type array|float, string given
|
||||
"x" => Argument ... must be of type array|float, string given
|
||||
"" => Argument ... must be of type array|float, string given
|
||||
true => Argument ... must be of type array|float, bool given
|
||||
false => Argument ... must be of type array|float, bool given
|
||||
null => Argument ... must be of type array|float, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|float, object given
|
||||
new WithToString => Argument ... ($arg) to be of type array|float, object given
|
||||
new stdClass => Argument ... must be of type array|float, object given
|
||||
new WithToString => Argument ... must be of type array|float, object given
|
||||
|
||||
Type string|array:
|
||||
42 => Argument ... ($arg) to be of type array|string, int given
|
||||
42.0 => Argument ... ($arg) to be of type array|string, float given
|
||||
INF => Argument ... ($arg) to be of type array|string, float given
|
||||
42 => Argument ... must be of type array|string, int given
|
||||
42.0 => Argument ... must be of type array|string, float given
|
||||
INF => Argument ... must be of type array|string, float given
|
||||
"42" => "42"
|
||||
"42.0" => "42.0"
|
||||
"42x" => "42x"
|
||||
"x" => "x"
|
||||
"" => ""
|
||||
true => Argument ... ($arg) to be of type array|string, bool given
|
||||
false => Argument ... ($arg) to be of type array|string, bool given
|
||||
null => Argument ... ($arg) to be of type array|string, null given
|
||||
true => Argument ... must be of type array|string, bool given
|
||||
false => Argument ... must be of type array|string, bool given
|
||||
null => Argument ... must be of type array|string, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|string, object given
|
||||
new WithToString => Argument ... ($arg) to be of type array|string, object given
|
||||
new stdClass => Argument ... must be of type array|string, object given
|
||||
new WithToString => Argument ... must be of type array|string, object given
|
||||
|
||||
Type bool|array:
|
||||
42 => Argument ... ($arg) to be of type array|bool, int given
|
||||
42.0 => Argument ... ($arg) to be of type array|bool, float given
|
||||
INF => Argument ... ($arg) to be of type array|bool, float given
|
||||
"42" => Argument ... ($arg) to be of type array|bool, string given
|
||||
"42.0" => Argument ... ($arg) to be of type array|bool, string given
|
||||
"42x" => Argument ... ($arg) to be of type array|bool, string given
|
||||
"x" => Argument ... ($arg) to be of type array|bool, string given
|
||||
"" => Argument ... ($arg) to be of type array|bool, string given
|
||||
42 => Argument ... must be of type array|bool, int given
|
||||
42.0 => Argument ... must be of type array|bool, float given
|
||||
INF => Argument ... must be of type array|bool, float given
|
||||
"42" => Argument ... must be of type array|bool, string given
|
||||
"42.0" => Argument ... must be of type array|bool, string given
|
||||
"42x" => Argument ... must be of type array|bool, string given
|
||||
"x" => Argument ... must be of type array|bool, string given
|
||||
"" => Argument ... must be of type array|bool, string given
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type array|bool, null given
|
||||
null => Argument ... must be of type array|bool, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type array|bool, object given
|
||||
new stdClass => Argument ... must be of type array|bool, object given
|
||||
new WithToString => Argument ... must be of type array|bool, object given
|
||||
|
|
|
@ -35,7 +35,7 @@ function test(string $type, array $values) {
|
|||
} catch (TypeError $e) {
|
||||
$msg = $e->getMessage();
|
||||
$msg = strstr($msg, ', called in', true);
|
||||
$msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg);
|
||||
$msg = str_replace('{closure}(): Argument #1 ($arg)', 'Argument ...', $msg);
|
||||
echo $msg;
|
||||
}
|
||||
echo "\n";
|
||||
|
@ -71,14 +71,14 @@ INF => INF
|
|||
"42" => 42
|
||||
"42.0" => 42.0
|
||||
"42x" => 42 (A non well formed numeric value encountered)
|
||||
"x" => Argument ... ($arg) to be of type int|float, string given
|
||||
"" => Argument ... ($arg) to be of type int|float, string given
|
||||
"x" => Argument ... must be of type int|float, string given
|
||||
"" => Argument ... must be of type int|float, string given
|
||||
true => 1
|
||||
false => 0
|
||||
null => Argument ... ($arg) to be of type int|float, null given
|
||||
[] => Argument ... ($arg) to be of type int|float, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float, object given
|
||||
null => Argument ... must be of type int|float, null given
|
||||
[] => Argument ... must be of type int|float, array given
|
||||
new stdClass => Argument ... must be of type int|float, object given
|
||||
new WithToString => Argument ... must be of type int|float, object given
|
||||
|
||||
Type int|float|false:
|
||||
42 => 42
|
||||
|
@ -87,14 +87,14 @@ INF => INF
|
|||
"42" => 42
|
||||
"42.0" => 42.0
|
||||
"42x" => 42 (A non well formed numeric value encountered)
|
||||
"x" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"" => Argument ... ($arg) to be of type int|float|false, string given
|
||||
"x" => Argument ... must be of type int|float|false, string given
|
||||
"" => Argument ... must be of type int|float|false, string given
|
||||
true => 1
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|float|false, null given
|
||||
[] => Argument ... ($arg) to be of type int|float|false, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float|false, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float|false, object given
|
||||
null => Argument ... must be of type int|float|false, null given
|
||||
[] => Argument ... must be of type int|float|false, array given
|
||||
new stdClass => Argument ... must be of type int|float|false, object given
|
||||
new WithToString => Argument ... must be of type int|float|false, object given
|
||||
|
||||
Type int|float|bool:
|
||||
42 => 42
|
||||
|
@ -107,10 +107,10 @@ INF => INF
|
|||
"" => false
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|float|bool, null given
|
||||
[] => Argument ... ($arg) to be of type int|float|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|float|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|float|bool, object given
|
||||
null => Argument ... must be of type int|float|bool, null given
|
||||
[] => Argument ... must be of type int|float|bool, array given
|
||||
new stdClass => Argument ... must be of type int|float|bool, object given
|
||||
new WithToString => Argument ... must be of type int|float|bool, object given
|
||||
|
||||
Type int|bool:
|
||||
42 => 42
|
||||
|
@ -123,10 +123,10 @@ INF => true
|
|||
"" => false
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type int|bool, null given
|
||||
[] => Argument ... ($arg) to be of type int|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type int|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type int|bool, object given
|
||||
null => Argument ... must be of type int|bool, null given
|
||||
[] => Argument ... must be of type int|bool, array given
|
||||
new stdClass => Argument ... must be of type int|bool, object given
|
||||
new WithToString => Argument ... must be of type int|bool, object given
|
||||
|
||||
Type int|string|null:
|
||||
42 => 42
|
||||
|
@ -140,8 +140,8 @@ INF => "INF"
|
|||
true => 1
|
||||
false => 0
|
||||
null => null
|
||||
[] => Argument ... ($arg) to be of type string|int|null, array given
|
||||
new stdClass => Argument ... ($arg) to be of type string|int|null, object given
|
||||
[] => Argument ... must be of type string|int|null, array given
|
||||
new stdClass => Argument ... must be of type string|int|null, object given
|
||||
new WithToString => "__toString()"
|
||||
|
||||
Type string|bool:
|
||||
|
@ -155,9 +155,9 @@ INF => "INF"
|
|||
"" => ""
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type string|bool, null given
|
||||
[] => Argument ... ($arg) to be of type string|bool, array given
|
||||
new stdClass => Argument ... ($arg) to be of type string|bool, object given
|
||||
null => Argument ... must be of type string|bool, null given
|
||||
[] => Argument ... must be of type string|bool, array given
|
||||
new stdClass => Argument ... must be of type string|bool, object given
|
||||
new WithToString => "__toString()"
|
||||
|
||||
Type float|array:
|
||||
|
@ -167,14 +167,14 @@ INF => INF
|
|||
"42" => 42.0
|
||||
"42.0" => 42.0
|
||||
"42x" => 42.0 (A non well formed numeric value encountered)
|
||||
"x" => Argument ... ($arg) to be of type array|float, string given
|
||||
"" => Argument ... ($arg) to be of type array|float, string given
|
||||
"x" => Argument ... must be of type array|float, string given
|
||||
"" => Argument ... must be of type array|float, string given
|
||||
true => 1.0
|
||||
false => 0.0
|
||||
null => Argument ... ($arg) to be of type array|float, null given
|
||||
null => Argument ... must be of type array|float, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|float, object given
|
||||
new WithToString => Argument ... ($arg) to be of type array|float, object given
|
||||
new stdClass => Argument ... must be of type array|float, object given
|
||||
new WithToString => Argument ... must be of type array|float, object given
|
||||
|
||||
Type string|array:
|
||||
42 => "42"
|
||||
|
@ -187,9 +187,9 @@ INF => "INF"
|
|||
"" => ""
|
||||
true => "1"
|
||||
false => ""
|
||||
null => Argument ... ($arg) to be of type array|string, null given
|
||||
null => Argument ... must be of type array|string, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|string, object given
|
||||
new stdClass => Argument ... must be of type array|string, object given
|
||||
new WithToString => "__toString()"
|
||||
|
||||
Type bool|array:
|
||||
|
@ -203,7 +203,7 @@ INF => true
|
|||
"" => false
|
||||
true => true
|
||||
false => false
|
||||
null => Argument ... ($arg) to be of type array|bool, null given
|
||||
null => Argument ... must be of type array|bool, null given
|
||||
[] => []
|
||||
new stdClass => Argument ... ($arg) to be of type array|bool, object given
|
||||
new WithToString => Argument ... ($arg) to be of type array|bool, object given
|
||||
new stdClass => Argument ... must be of type array|bool, object given
|
||||
new WithToString => Argument ... must be of type array|bool, object given
|
||||
|
|
|
@ -11,7 +11,7 @@ require 'weak_include_strict_2.inc';
|
|||
// calls within that file should stay strict, despite being included by weak file
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: takes_int() expects argument #1 ($x) to be of type int, float given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: takes_int(): Argument #1 ($x) must be of type int, float given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): takes_int(1)
|
||||
#1 %s(%d): require('%s')
|
||||
|
|
|
@ -219,39 +219,39 @@ try {
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: unloadedClass(): Argument #1 ($param) must be of type ?I\Dont\Exist, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(8): unloadedClass(Object(stdClass))
|
||||
#1 {main}
|
||||
TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: loadedClass(): Argument #1 ($param) must be of type ?RealClass, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(20): loadedClass(Object(stdClass))
|
||||
#1 {main}
|
||||
TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, stdClass given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: loadedInterface(): Argument #1 ($param) must be of type ?RealInterface, stdClass given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(26): loadedInterface(Object(stdClass))
|
||||
#1 {main}
|
||||
TypeError: unloadedClass() expects argument #1 ($param) to be of type ?I\Dont\Exist, int given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: unloadedClass(): Argument #1 ($param) must be of type ?I\Dont\Exist, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(32): unloadedClass(1)
|
||||
#1 {main}
|
||||
TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, int given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: loadedClass(): Argument #1 ($param) must be of type ?RealClass, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(38): loadedClass(1)
|
||||
#1 {main}
|
||||
TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, int given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: loadedInterface(): Argument #1 ($param) must be of type ?RealInterface, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(44): loadedInterface(1)
|
||||
#1 {main}
|
||||
TypeError: callableF() expects argument #1 ($param) to be of type ?callable, int given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: callableF(): Argument #1 ($param) must be of type ?callable, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(52): callableF(1)
|
||||
#1 {main}
|
||||
TypeError: iterableF() expects argument #1 ($param) to be of type ?iterable, int given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: iterableF(): Argument #1 ($param) must be of type ?iterable, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(60): iterableF(1)
|
||||
#1 {main}
|
||||
TypeError: intF() expects argument #1 ($param) to be of type ?int, object given, called in %s on line %d and defined in %s:%d
|
||||
TypeError: intF(): Argument #1 ($param) must be of type ?int, object given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(68): intF(Object(stdClass))
|
||||
#1 {main}
|
||||
|
|
|
@ -33,7 +33,7 @@ array(3) {
|
|||
}
|
||||
}
|
||||
|
||||
Fatal error: Uncaught TypeError: test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d and defined in %s:%d
|
||||
Fatal error: Uncaught TypeError: test(): Argument #3 ($args) must be of type array, int given, called in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): test(Array, Array, 2)
|
||||
#1 {main}
|
||||
|
|
|
@ -15,4 +15,4 @@ try {
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d"
|
||||
string(%d) "test(): Argument #3 ($args) must be of type array, int given, called in %s on line %d"
|
||||
|
|
|
@ -216,7 +216,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, z
|
|||
return;
|
||||
}
|
||||
|
||||
zend_argument_type_error(num, "to be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg));
|
||||
zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -226,7 +226,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num,
|
|||
return;
|
||||
}
|
||||
|
||||
zend_argument_type_error(num, "to be of type %s, %s given", name, zend_zval_type_name(arg));
|
||||
zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_type_name(arg));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -236,7 +236,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *e
|
|||
return;
|
||||
}
|
||||
|
||||
zend_argument_type_error(num, "to be a valid callback, %s", error);
|
||||
zend_argument_type_error(num, "must be a valid callback, %s", error);
|
||||
efree(error);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -259,9 +259,10 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error(zend_class_entry *erro
|
|||
zend_vspprintf(&message, 0, format, va);
|
||||
va_end(va);
|
||||
|
||||
zend_throw_error(error_ce, "%s%s%s() expects argument #%d%s%s%s %s",
|
||||
class_name, space, get_active_function_name(), arg_num,
|
||||
arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "", message
|
||||
zend_throw_error(error_ce, "%s%s%s(): Argument #%d%s%s%s %s",
|
||||
class_name, space, get_active_function_name(),
|
||||
arg_num, arg_name ? " ($" : "", arg_name ? arg_name : "", arg_name ? ")" : "",
|
||||
message
|
||||
);
|
||||
efree(message);
|
||||
}
|
||||
|
@ -283,13 +284,13 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pc
|
|||
*pce = zend_lookup_class(Z_STR_P(arg));
|
||||
if (ce_base) {
|
||||
if ((!*pce || !instanceof_function(*pce, ce_base))) {
|
||||
zend_argument_type_error(num, "to be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg));
|
||||
zend_argument_type_error(num, "must be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg));
|
||||
*pce = NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!*pce) {
|
||||
zend_argument_type_error(num, "to be a valid class name, '%s' given", Z_STRVAL_P(arg));
|
||||
zend_argument_type_error(num, "must be a valid class name, '%s' given", Z_STRVAL_P(arg));
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
|
@ -745,10 +746,10 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec
|
|||
}
|
||||
if (!(flags & ZEND_PARSE_PARAMS_QUIET) && (*expected_type || error)) {
|
||||
if (error) {
|
||||
zend_argument_type_error(arg_num, "to be %s", error);
|
||||
zend_argument_type_error(arg_num, "must be %s", error);
|
||||
efree(error);
|
||||
} else {
|
||||
zend_argument_type_error(arg_num, "to be of type %s, %s given", expected_type, zend_zval_type_name(arg));
|
||||
zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_type_name(arg));
|
||||
}
|
||||
} else if (error) {
|
||||
efree(error);
|
||||
|
|
|
@ -1388,7 +1388,7 @@ ZEND_FUNCTION(set_error_handler)
|
|||
if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */
|
||||
if (!zend_is_callable(error_handler, 0, NULL)) {
|
||||
zend_string *error_handler_name = zend_get_callable_name(error_handler);
|
||||
zend_error(E_WARNING, "%s() expects argument #1 ($error_handler) to be a valid callback", get_active_function_name());
|
||||
zend_error(E_WARNING, "%s(): Argument #1 ($error_handler) must be a valid callback", get_active_function_name());
|
||||
zend_string_release_ex(error_handler_name, 0);
|
||||
return;
|
||||
}
|
||||
|
@ -1452,7 +1452,7 @@ ZEND_FUNCTION(set_exception_handler)
|
|||
if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */
|
||||
if (!zend_is_callable(exception_handler, 0, NULL)) {
|
||||
zend_string *exception_handler_name = zend_get_callable_name(exception_handler);
|
||||
zend_error(E_WARNING, "%s() expects argument #1 ($exception_handler) to be a valid callback", get_active_function_name());
|
||||
zend_error(E_WARNING, "%s(): Argument #1 ($exception_handler) must be a valid callback", get_active_function_name());
|
||||
zend_string_release_ex(exception_handler_name, 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -692,16 +692,21 @@ ZEND_API ZEND_COLD void zend_verify_arg_error(
|
|||
|
||||
if (zf->common.type == ZEND_USER_FUNCTION) {
|
||||
if (ptr && ptr->func && ZEND_USER_CODE(ptr->func->common.type)) {
|
||||
zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given, called in %s on line %d",
|
||||
fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg,
|
||||
ZSTR_VAL(ptr->func->op_array.filename), ptr->opline->lineno);
|
||||
zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given, called in %s on line %d",
|
||||
fclass, fsep, fname,
|
||||
arg_num, ZSTR_VAL(arg_info->name),
|
||||
ZSTR_VAL(need_msg), given_msg,
|
||||
ZSTR_VAL(ptr->func->op_array.filename), ptr->opline->lineno
|
||||
);
|
||||
} else {
|
||||
zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given",
|
||||
fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg);
|
||||
zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given",
|
||||
fclass, fsep, fname, arg_num, ZSTR_VAL(arg_info->name), ZSTR_VAL(need_msg), given_msg
|
||||
);
|
||||
}
|
||||
} else {
|
||||
zend_type_error("%s%s%s() expects argument #%d ($%s) to be of type %s, %s given",
|
||||
fclass, fsep, fname, arg_num, ((zend_internal_arg_info*) arg_info)->name, ZSTR_VAL(need_msg), given_msg);
|
||||
zend_type_error("%s%s%s(): Argument #%d ($%s) must be of type %s, %s given",
|
||||
fclass, fsep, fname, arg_num, ((zend_internal_arg_info*) arg_info)->name, ZSTR_VAL(need_msg), given_msg
|
||||
);
|
||||
}
|
||||
|
||||
zend_string_release(need_msg);
|
||||
|
@ -1925,7 +1930,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_param_must_be_ref(con
|
|||
{
|
||||
const char *arg_name = get_function_arg_name(func, arg_num);
|
||||
|
||||
zend_error(E_WARNING, "%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given",
|
||||
zend_error(E_WARNING, "%s%s%s(): Argument #%d%s%s%s must be passed by reference, value given",
|
||||
func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
|
||||
func->common.scope ? "::" : "",
|
||||
ZSTR_VAL(func->common.function_name),
|
||||
|
@ -2550,8 +2555,9 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error(
|
|||
ZVAL_UNDEFINED_OP2();
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
zend_type_error("array_key_exists() expects argument #2 ($array) to be of type array, %s given",
|
||||
zend_get_type_by_const(Z_TYPE_P(subject)));
|
||||
zend_type_error("array_key_exists(): Argument #2 ($array) must be of type array, %s given",
|
||||
zend_get_type_by_const(Z_TYPE_P(subject))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -751,7 +751,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
|||
const char *arg_name = get_function_arg_name(func, i + 1);
|
||||
|
||||
zend_error(E_WARNING,
|
||||
"%s%s%s() expects argument #%d%s%s%s to be passed by reference, value given",
|
||||
"%s%s%s(): Argument #%d%s%s%s must be passed by reference, value given",
|
||||
func->common.scope ? ZSTR_VAL(func->common.scope->name) : "",
|
||||
func->common.scope ? "::" : "",
|
||||
ZSTR_VAL(func->common.function_name),
|
||||
|
|
|
@ -3775,7 +3775,7 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV, NUM)
|
|||
init_func_run_time_cache(&func->op_array);
|
||||
}
|
||||
} else {
|
||||
zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
efree(error);
|
||||
FREE_OP2();
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -4938,7 +4938,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM)
|
|||
ZEND_VM_C_GOTO(send_array);
|
||||
}
|
||||
}
|
||||
zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
|
||||
zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
|
||||
FREE_UNFETCHED_OP2();
|
||||
FREE_OP1();
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -7909,7 +7909,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY)
|
|||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
}
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
} while (0);
|
||||
|
@ -8517,7 +8517,7 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED)
|
|||
if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
|
||||
ZVAL_UNDEFINED_OP1();
|
||||
}
|
||||
zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1981,7 +1981,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O
|
|||
goto send_array;
|
||||
}
|
||||
}
|
||||
zend_type_error("call_user_func_array() expects argument #2 ($args) to be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
|
||||
zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_get_type_by_const(Z_TYPE_P(args)));
|
||||
FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var);
|
||||
FREE_OP(opline->op1_type, opline->op1.var);
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -4464,7 +4464,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST
|
|||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
}
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
} while (0);
|
||||
|
@ -5889,7 +5889,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
|
|||
init_func_run_time_cache(&func->op_array);
|
||||
}
|
||||
} else {
|
||||
zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
efree(error);
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -8065,7 +8065,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
|
|||
init_func_run_time_cache(&func->op_array);
|
||||
}
|
||||
} else {
|
||||
zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
efree(error);
|
||||
zval_ptr_dtor_nogc(EX_VAR(opline->op2.var));
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -9333,7 +9333,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO
|
|||
if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
|
||||
ZVAL_UNDEFINED_OP1();
|
||||
}
|
||||
zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
break;
|
||||
|
@ -10320,7 +10320,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
|
|||
init_func_run_time_cache(&func->op_array);
|
||||
}
|
||||
} else {
|
||||
zend_type_error("%s() expects argument #1 ($function) to be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
zend_type_error("%s(): Argument #1 ($function) must be a valid callback, %s", Z_STRVAL_P(RT_CONSTANT(opline, opline->op1)), error);
|
||||
efree(error);
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
|
@ -13305,7 +13305,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN
|
|||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
}
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
} while (0);
|
||||
|
@ -16412,7 +16412,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H
|
|||
if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
|
||||
ZVAL_UNDEFINED_OP1();
|
||||
}
|
||||
zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
break;
|
||||
|
@ -33308,7 +33308,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H
|
|||
if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
|
||||
ZVAL_UNDEFINED_OP1();
|
||||
}
|
||||
zend_type_error("get_class() expects argument 1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
zend_type_error("Argument 1 ($object) passed to get_class() must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
break;
|
||||
|
@ -36702,7 +36702,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP
|
|||
zval_ptr_dtor(&tmp);
|
||||
}
|
||||
if (!EG(exception)) {
|
||||
zend_type_error("strlen() expects argument #1 ($str) to be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_get_type_by_const(Z_TYPE_P(value)));
|
||||
}
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
} while (0);
|
||||
|
@ -45260,7 +45260,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL
|
|||
if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) {
|
||||
ZVAL_UNDEFINED_OP1();
|
||||
}
|
||||
zend_type_error("get_class() expects argument #1 ($object) to be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_get_type_by_const(Z_TYPE_P(op1)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -20,6 +20,6 @@ curl_setopt($ch, -10, 0);
|
|||
?>
|
||||
--EXPECTF--
|
||||
*** curl_setopt() call with incorrect parameters
|
||||
curl_setopt() expects argument #2 ($option) to be of type int, string given
|
||||
curl_setopt(): Argument #2 ($option) must be of type int, string given
|
||||
|
||||
Warning: curl_setopt(): Invalid curl configuration option in %scurl_setopt_error.php on line %d
|
||||
|
|
|
@ -33,7 +33,7 @@ object(DateTimeZone)#%d (2) {
|
|||
}
|
||||
int(0)
|
||||
|
||||
Fatal error: Uncaught TypeError: timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given in %s:%d
|
||||
Fatal error: Uncaught TypeError: timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, object given in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): timezone_offset_get(Object(DateTime), Object(DateTimeZone))
|
||||
#1 {main}
|
||||
|
|
|
@ -14,4 +14,4 @@ try {
|
|||
}
|
||||
--EXPECT--
|
||||
3600
|
||||
DateTimeZone::getOffset() expects argument #1 ($datetime) to be of type DateTimeInterface, int given
|
||||
DateTimeZone::getOffset(): Argument #1 ($datetime) must be of type DateTimeInterface, int given
|
||||
|
|
|
@ -24,4 +24,4 @@ object(DateTimeImmutable)#%d (3) {
|
|||
["timezone"]=>
|
||||
string(13) "Europe/London"
|
||||
}
|
||||
DateTimeImmutable::createFromMutable() expects argument #1 ($object) to be of type DateTime, object given
|
||||
DateTimeImmutable::createFromMutable(): Argument #1 ($object) must be of type DateTime, object given
|
||||
|
|
|
@ -30,4 +30,4 @@ object(DateTime)#%d (3) {
|
|||
string(13) "Europe/London"
|
||||
}
|
||||
bool(true)
|
||||
DateTime::createFromImmutable() expects argument #1 ($object) to be of type DateTimeImmutable, object given
|
||||
DateTime::createFromImmutable(): Argument #1 ($object) must be of type DateTimeImmutable, object given
|
||||
|
|
|
@ -13,4 +13,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
mktime() expects argument #6 ($year) to be of type int, float given
|
||||
mktime(): Argument #6 ($year) must be of type int, float given
|
||||
|
|
|
@ -28,7 +28,7 @@ var_dump($i->format('%s'));
|
|||
string(32) "5138-11-16 09:46:40 100000000000"
|
||||
bool(false)
|
||||
string(12) "100000000000"
|
||||
DateTime::setTimestamp() expects argument #1 ($timestamp) to be of type int, float given
|
||||
DateTime::setTimestamp(): Argument #1 ($timestamp) must be of type int, float given
|
||||
string(32) "5138-11-16 09:46:40 100000000000"
|
||||
bool(false)
|
||||
string(10) "1215752192"
|
||||
|
|
|
@ -10,4 +10,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
strtotime() expects argument #2 ($now) to be of type int, object given
|
||||
strtotime(): Argument #2 ($now) must be of type int, object given
|
||||
|
|
|
@ -47,11 +47,11 @@ float(%s)
|
|||
int(0)
|
||||
}
|
||||
}
|
||||
microtime() expects argument #1 ($get_as_float) to be of type bool, array given
|
||||
microtime(): Argument #1 ($get_as_float) must be of type bool, array given
|
||||
|
||||
--> bad arg: object(stdClass)#%d (0) {
|
||||
}
|
||||
microtime() expects argument #1 ($get_as_float) to be of type bool, object given
|
||||
microtime(): Argument #1 ($get_as_float) must be of type bool, object given
|
||||
|
||||
--> bad arg: int(1)
|
||||
float(%s)
|
||||
|
|
|
@ -65,16 +65,16 @@ try {
|
|||
*** Testing timezone_offset_get() : error conditions ***
|
||||
|
||||
-- Testing timezone_offset_get() function with an invalid values for $object argument --
|
||||
string(92) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, object given"
|
||||
string(87) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, object given"
|
||||
|
||||
string(89) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, int given"
|
||||
string(84) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, int given"
|
||||
|
||||
string(90) "timezone_offset_get() expects argument #1 ($object) to be of type DateTimeZone, null given"
|
||||
string(85) "timezone_offset_get(): Argument #1 ($object) must be of type DateTimeZone, null given"
|
||||
|
||||
|
||||
-- Testing timezone_offset_get() function with an invalid values for $datetime argument --
|
||||
string(99) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, object given"
|
||||
string(94) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, object given"
|
||||
|
||||
string(96) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, int given"
|
||||
string(91) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, int given"
|
||||
|
||||
string(97) "timezone_offset_get() expects argument #2 ($datetime) to be of type DateTimeInterface, null given"
|
||||
string(92) "timezone_offset_get(): Argument #2 ($datetime) must be of type DateTimeInterface, null given"
|
||||
|
|
|
@ -23,5 +23,5 @@ try {
|
|||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
TypeError: FFI::isNull() expects argument #1 ($ptr) to be of type FFI\CData, null given
|
||||
TypeError: FFI::isNull(): Argument #1 ($ptr) must be of type FFI\CData, null given
|
||||
FFI\Exception: Cannot instantiate FFI\CData of zero size
|
||||
|
|
|
@ -19,7 +19,7 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent'));
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
finfo_open() expects argument #2 ($arg) to be a valid path, string given
|
||||
finfo_open(): Argument #2 ($arg) must be a valid path, string given
|
||||
resource(%d) of type (file_info)
|
||||
resource(%d) of type (file_info)
|
||||
|
||||
|
|
|
@ -42,5 +42,5 @@ bool(false)
|
|||
|
||||
Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line %d
|
||||
resource(6) of type (file_info)
|
||||
finfo_open() expects argument #1 ($options) to be of type int, string given
|
||||
finfo::__construct() expects argument #1 ($options) to be of type int, string given
|
||||
finfo_open(): Argument #1 ($options) must be of type int, string given
|
||||
finfo::__construct(): Argument #1 ($options) must be of type int, string given
|
||||
|
|
|
@ -14,4 +14,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
imagegd() expects argument #2 ($to) to be a valid path, string given
|
||||
imagegd(): Argument #2 ($to) must be a valid path, string given
|
||||
|
|
|
@ -14,4 +14,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
imagegd() expects argument #2 ($to) to be a valid path, string given
|
||||
imagegd(): Argument #2 ($to) must be a valid path, string given
|
||||
|
|
|
@ -14,4 +14,4 @@ try {
|
|||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
imagexbm() expects argument #2 ($filename) to be a valid path, string given
|
||||
imagexbm(): Argument #2 ($filename) must be a valid path, string given
|
||||
|
|
|
@ -47,5 +47,5 @@ Warning: gmp_clrbit(): Index must be greater than or equal to zero in %s on line
|
|||
string(7) "1000000"
|
||||
string(7) "1000000"
|
||||
string(30) "238462734628347239571822592658"
|
||||
gmp_clrbit() expects argument #1 ($a) to be of type GMP, array given
|
||||
gmp_clrbit(): Argument #1 ($a) must be of type GMP, array given
|
||||
Done
|
||||
|
|
|
@ -47,7 +47,7 @@ Warning: gmp_pow(): Negative exponent not supported in %s on line %d
|
|||
string(1) "0"
|
||||
string(14) "10240000000000"
|
||||
string(14) "10240000000000"
|
||||
gmp_pow() expects argument #2 ($exp) to be of type int, array given
|
||||
gmp_pow(): Argument #2 ($exp) must be of type int, array given
|
||||
|
||||
Warning: gmp_pow(): Unable to convert variable to GMP - wrong type in %s on line %d
|
||||
bool(false)
|
||||
|
|
|
@ -57,6 +57,6 @@ string(1) "7"
|
|||
string(12) "100008388608"
|
||||
string(12) "100000000000"
|
||||
string(12) "100000000008"
|
||||
gmp_setbit() expects argument #1 ($a) to be of type GMP, string given
|
||||
gmp_setbit() expects argument #1 ($a) to be of type GMP, array given
|
||||
gmp_setbit(): Argument #1 ($a) must be of type GMP, string given
|
||||
gmp_setbit(): Argument #1 ($a) must be of type GMP, array given
|
||||
Done
|
||||
|
|
|
@ -22,6 +22,6 @@ Checking with no parameters
|
|||
Warning: imap_num_recent() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_num_recent() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_num_recent(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_num_recent() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_num_recent(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
|
|
@ -28,8 +28,8 @@ Checking with no parameters
|
|||
Warning: imap_gc() Expects exactly 2 parameters, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_gc() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_gc(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_gc() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_gc(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
||||
Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d
|
||||
|
|
|
@ -22,6 +22,6 @@ Checking with no parameters
|
|||
Warning: imap_headers() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_headers() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_headers(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_headers() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_headers(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
|
|
@ -22,6 +22,6 @@ Checking with no parameters
|
|||
Warning: imap_num_msg() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_num_msg() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_num_msg(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_num_msg() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_num_msg(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
|
|
@ -22,6 +22,6 @@ Checking with no parameters
|
|||
Warning: imap_expunge() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_expunge() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_expunge(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_expunge() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_expunge(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
|
|
@ -22,6 +22,6 @@ Checking with no parameters
|
|||
Warning: imap_ping() expects exactly 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_ping() expects argument #1 to be of type resource, string given in %s on line %d
|
||||
Warning: imap_ping(): Argument #1 must be of type resource, string given in %s on line %d
|
||||
|
||||
Warning: imap_ping() expects argument #1 to be of type resource, bool given in %s on line %d
|
||||
Warning: imap_ping(): Argument #1 must be of type resource, bool given in %s on line %d
|
||||
|
|
|
@ -44,7 +44,7 @@ Checking with no parameters
|
|||
Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d
|
||||
Checking with incorrect parameter type
|
||||
|
||||
Warning: imap_timeout() expects argument #1 to be of type int, %s given in %s on line %d
|
||||
Warning: imap_timeout(): Argument #1 must be of type int, %s given in %s on line %d
|
||||
GET values:
|
||||
int(%d)
|
||||
int(%d)
|
||||
|
|
|
@ -43,6 +43,6 @@ Exception: IntlRuleBasedBreakIterator::__construct() expects at least 1 paramete
|
|||
|
||||
Exception: IntlRuleBasedBreakIterator::__construct() expects at most 2 parameters, 3 given in %s on line %d
|
||||
|
||||
Exception: IntlRuleBasedBreakIterator::__construct() expects argument #2 ($areCompiled) to be of type bool, array given in %s on line %d
|
||||
Exception: IntlRuleBasedBreakIterator::__construct(): Argument #2 ($areCompiled) must be of type bool, array given in %s on line %d
|
||||
|
||||
Exception: IntlRuleBasedBreakIterator::__construct(): rbbi_create_instance: unable to create instance from compiled rules in %s on line %d
|
||||
|
|
|
@ -16,7 +16,7 @@ foreach (['', 1, NULL, $x] as $value) {
|
|||
|
||||
?>
|
||||
--EXPECT--
|
||||
NumberFormatter::format() expects argument #1 ($value) to be of type number, string given
|
||||
NumberFormatter::format(): Argument #1 ($value) must be of type number, string given
|
||||
string(1) "1"
|
||||
string(1) "0"
|
||||
NumberFormatter::format() expects argument #1 ($value) to be of type number, object given
|
||||
NumberFormatter::format(): Argument #1 ($value) must be of type number, object given
|
||||
|
|
|
@ -12,7 +12,7 @@ ini_set("intl.error_level", E_WARNING);
|
|||
|
||||
var_dump(intlcal_add(1, 2, 3));
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: intlcal_add() expects argument #1 ($calendar) to be of type IntlCalendar, int given in %s:%d
|
||||
Fatal error: Uncaught TypeError: intlcal_add(): Argument #1 ($calendar) must be of type IntlCalendar, int given in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): intlcal_add(1, 2, 3)
|
||||
#1 {main}
|
||||
|
|
|
@ -65,9 +65,9 @@ error: 0, IntlCalendar::after() expects exactly 1 parameter, 0 given
|
|||
|
||||
error: 0, IntlCalendar::before() expects exactly 1 parameter, 0 given
|
||||
|
||||
error: 0, IntlCalendar::after() expects argument #1 ($calendar) to be of type IntlCalendar, int given
|
||||
error: 0, IntlCalendar::after(): Argument #1 ($calendar) must be of type IntlCalendar, int given
|
||||
|
||||
error: 0, IntlCalendar::before() expects argument #1 ($calendar) to be of type IntlCalendar, int given
|
||||
error: 0, IntlCalendar::before(): Argument #1 ($calendar) must be of type IntlCalendar, int given
|
||||
|
||||
error: 0, IntlCalendar::after() expects exactly 1 parameter, 2 given
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue