summaryrefslogtreecommitdiff
path: root/Zend/tests
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests')
-rw-r--r--Zend/tests/008.phpt2
-rw-r--r--Zend/tests/009.phpt4
-rw-r--r--Zend/tests/arrow_functions/006.phpt4
-rw-r--r--Zend/tests/bug31720.phpt2
-rw-r--r--Zend/tests/bug39003.phpt2
-rw-r--r--Zend/tests/bug42802.phpt2
-rw-r--r--Zend/tests/bug43332_1.phpt2
-rw-r--r--Zend/tests/bug45186.phpt2
-rw-r--r--Zend/tests/bug45186_2.phpt4
-rw-r--r--Zend/tests/bug48770_2.phpt8
-rw-r--r--Zend/tests/bug48770_3.phpt4
-rw-r--r--Zend/tests/bug61273.phpt2
-rw-r--r--Zend/tests/bug68446.phpt2
-rw-r--r--Zend/tests/bug70895.phpt6
-rw-r--r--Zend/tests/bug70898.phpt2
-rw-r--r--Zend/tests/bug72101.phpt2
-rw-r--r--Zend/tests/bug72598.phpt4
-rw-r--r--Zend/tests/bug72598_2.phpt4
-rw-r--r--Zend/tests/bug73954.phpt2
-rw-r--r--Zend/tests/bug74164.phpt2
-rw-r--r--Zend/tests/call_user_func_001.phpt4
-rw-r--r--Zend/tests/call_user_func_002.phpt8
-rw-r--r--Zend/tests/call_user_func_006.phpt4
-rw-r--r--Zend/tests/call_user_func_007.phpt2
-rw-r--r--Zend/tests/call_user_func_008.phpt16
-rw-r--r--Zend/tests/call_user_func_009.phpt4
-rw-r--r--Zend/tests/call_user_func_array_invalid_type.phpt2
-rw-r--r--Zend/tests/closure_027.phpt4
-rw-r--r--Zend/tests/closure_059.phpt6
-rw-r--r--Zend/tests/errmsg_013.phpt2
-rw-r--r--Zend/tests/exception_017.phpt2
-rw-r--r--Zend/tests/exception_handler_004.phpt4
-rw-r--r--Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt4
-rw-r--r--Zend/tests/function_arguments/variadic_argument_type_error.phpt22
-rw-r--r--Zend/tests/generators/generator_with_type_check.phpt2
-rw-r--r--Zend/tests/generators/generator_with_type_check_2.phpt4
-rw-r--r--Zend/tests/generators/throw_not_an_exception.phpt2
-rw-r--r--Zend/tests/methods-on-non-objects-call-user-func.phpt2
-rw-r--r--Zend/tests/ns_071.phpt2
-rw-r--r--Zend/tests/ns_072.phpt2
-rw-r--r--Zend/tests/object_types/return_type_in_class.phpt2
-rw-r--r--Zend/tests/object_types/return_type_in_function.phpt2
-rw-r--r--Zend/tests/object_types/return_type_inheritance_in_class.phpt2
-rw-r--r--Zend/tests/object_types/return_type_inheritance_in_interface.phpt2
-rw-r--r--Zend/tests/object_types/type_hint_in_class_method.phpt2
-rw-r--r--Zend/tests/object_types/type_hint_in_function.phpt2
-rw-r--r--Zend/tests/objects_022.phpt2
-rw-r--r--Zend/tests/return_types/001.phpt2
-rw-r--r--Zend/tests/return_types/002.phpt2
-rw-r--r--Zend/tests/return_types/003.phpt2
-rw-r--r--Zend/tests/return_types/004.phpt2
-rw-r--r--Zend/tests/return_types/005.phpt2
-rw-r--r--Zend/tests/return_types/010.phpt2
-rw-r--r--Zend/tests/return_types/013.phpt2
-rw-r--r--Zend/tests/return_types/028.phpt2
-rw-r--r--Zend/tests/return_types/029.phpt2
-rw-r--r--Zend/tests/return_types/030.phpt2
-rw-r--r--Zend/tests/return_types/bug70557.phpt2
-rw-r--r--Zend/tests/return_types/bug71092.phpt2
-rw-r--r--Zend/tests/return_types/internal_functions001.phpt2
-rw-r--r--Zend/tests/return_types/rfc001.phpt2
-rw-r--r--Zend/tests/return_types/rfc003.phpt2
-rw-r--r--Zend/tests/trait_type_errors.phpt6
-rw-r--r--Zend/tests/type_declarations/array_001.phpt2
-rw-r--r--Zend/tests/type_declarations/callable_001.phpt2
-rw-r--r--Zend/tests/type_declarations/explicit_weak_include_strict.phpt2
-rw-r--r--Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt2
-rw-r--r--Zend/tests/type_declarations/internal_function_strict_mode.phpt6
-rw-r--r--Zend/tests/type_declarations/iterable_001.phpt2
-rw-r--r--Zend/tests/type_declarations/iterable_003.phpt2
-rw-r--r--Zend/tests/type_declarations/scalar_basic.phpt48
-rw-r--r--Zend/tests/type_declarations/scalar_constant_defaults.phpt4
-rw-r--r--Zend/tests/type_declarations/scalar_constant_defaults_error.phpt2
-rw-r--r--Zend/tests/type_declarations/scalar_null.phpt8
-rw-r--r--Zend/tests/type_declarations/scalar_return_basic.phpt48
-rw-r--r--Zend/tests/type_declarations/scalar_return_basic_64bit.phpt48
-rw-r--r--Zend/tests/type_declarations/scalar_strict.phpt102
-rw-r--r--Zend/tests/type_declarations/scalar_strict_64bit.phpt102
-rw-r--r--Zend/tests/type_declarations/scalar_strict_basic.phpt60
-rw-r--r--Zend/tests/type_declarations/static_type_return.phpt6
-rw-r--r--Zend/tests/type_declarations/static_type_trait.phpt2
-rw-r--r--Zend/tests/type_declarations/strict_call_weak.phpt2
-rw-r--r--Zend/tests/type_declarations/strict_call_weak_explicit.phpt2
-rw-r--r--Zend/tests/type_declarations/typed_properties_078.phpt2
-rw-r--r--Zend/tests/type_declarations/union_types/legal_default_values.phpt2
-rw-r--r--Zend/tests/type_declarations/union_types/multiple_classes.phpt2
-rw-r--r--Zend/tests/type_declarations/union_types/type_checking_strict.phpt170
-rw-r--r--Zend/tests/type_declarations/union_types/type_checking_weak.phpt72
-rw-r--r--Zend/tests/type_declarations/weak_include_strict.phpt2
-rw-r--r--Zend/tests/typehints/or_null.phpt48
-rw-r--r--Zend/tests/variadic/typehint_error.phpt2
-rw-r--r--Zend/tests/variadic/typehint_suppressed_error.phpt2
92 files changed, 493 insertions, 471 deletions
diff --git a/Zend/tests/008.phpt b/Zend/tests/008.phpt
index 6f885c0dc5..f597812fa8 100644
--- a/Zend/tests/008.phpt
+++ b/Zend/tests/008.phpt
@@ -25,7 +25,7 @@ var_dump(constant("test const"));
echo "Done\n";
?>
--EXPECTF--
-TypeError: define() expects parameter 1 to be string, array given
+TypeError: define() expects argument #1 ($constant_name) to be of type string, array given
Notice: Constant TRUE already defined in %s on line %d
bool(false)
diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt
index d6ac1be4e2..222fd36297 100644
--- a/Zend/tests/009.phpt
+++ b/Zend/tests/009.phpt
@@ -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 parameter 1 to be object, string given
+get_class() expects argument #1 ($object) to be of type object, string given
string(3) "foo"
string(4) "foo2"
-get_class() expects parameter 1 to be object, null given
+get_class() expects argument #1 ($object) to be of type object, null given
Done
diff --git a/Zend/tests/arrow_functions/006.phpt b/Zend/tests/arrow_functions/006.phpt
index 16427146a8..e0ca1e1b5c 100644
--- a/Zend/tests/arrow_functions/006.phpt
+++ b/Zend/tests/arrow_functions/006.phpt
@@ -32,7 +32,7 @@ try {
--EXPECTF--
int(2)
int(10)
-Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+{closure}() expects argument #1 ($x) to 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)
}
-Argument 2 passed to {closure}() must be of the type int or null, string given, called in %s on line %d
+{closure}() expects argument #2 ($args) to be of type ?int, string given, called in %s on line %d
diff --git a/Zend/tests/bug31720.phpt b/Zend/tests/bug31720.phpt
index 1e01d41772..ea4ba7753c 100644
--- a/Zend/tests/bug31720.phpt
+++ b/Zend/tests/bug31720.phpt
@@ -12,4 +12,4 @@ try {
?>
--EXPECTF--
Warning: Undefined variable: nonesuchvar in %s on line %d
-array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object
+array_walk() expects argument #2 ($funcname) to be a valid callback, first array member is not a valid class name or object
diff --git a/Zend/tests/bug39003.phpt b/Zend/tests/bug39003.phpt
index 9fa3e0d26b..758e3f9c83 100644
--- a/Zend/tests/bug39003.phpt
+++ b/Zend/tests/bug39003.phpt
@@ -20,7 +20,7 @@ test($obj);
echo "Done\n";
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): test(Object(ClassName))
#1 {main}
diff --git a/Zend/tests/bug42802.phpt b/Zend/tests/bug42802.phpt
index 1294bdbb2f..084b7c0e9d 100644
--- a/Zend/tests/bug42802.phpt
+++ b/Zend/tests/bug42802.phpt
@@ -37,7 +37,7 @@ ok
ok
ok
-Fatal error: Uncaught TypeError: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
+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
Stack trace:
#0 %s(%d): foo\test5(Object(foo\bar))
#1 {main}
diff --git a/Zend/tests/bug43332_1.phpt b/Zend/tests/bug43332_1.phpt
index fc035ab2b6..e7f52eae9c 100644
--- a/Zend/tests/bug43332_1.phpt
+++ b/Zend/tests/bug43332_1.phpt
@@ -12,7 +12,7 @@ $foo = new foo;
$foo->bar($foo); // Ok!
$foo->bar(new \stdclass); // Error, ok!
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
+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
Stack trace:
#0 %s(%d): foobar\foo->bar(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt
index 11968091e3..d60cab5088 100644
--- a/Zend/tests/bug45186.phpt
+++ b/Zend/tests/bug45186.phpt
@@ -54,4 +54,4 @@ string(1) "y"
ok
__callstatic:
string(3) "www"
-call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active
+call_user_func() expects argument #1 ($function) to be a valid callback, cannot access self:: when no class scope is active
diff --git a/Zend/tests/bug45186_2.phpt b/Zend/tests/bug45186_2.phpt
index 5e962dd29a..262b379180 100644
--- a/Zend/tests/bug45186_2.phpt
+++ b/Zend/tests/bug45186_2.phpt
@@ -52,5 +52,5 @@ string(1) "y"
__call:
string(1) "y"
ok
-call_user_func() expects parameter 1 to be a valid callback, class 'bar' does not have a method 'www'
-call_user_func() expects parameter 1 to be a valid callback, cannot access self:: when no class scope is active
+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
diff --git a/Zend/tests/bug48770_2.phpt b/Zend/tests/bug48770_2.phpt
index d94ae1b217..c5c17acb83 100644
--- a/Zend/tests/bug48770_2.phpt
+++ b/Zend/tests/bug48770_2.phpt
@@ -24,13 +24,13 @@ class B extends A {
public function func($str) {
call_user_func_array(array($this, 'parent::func2'), array($str));
call_user_func_array(array($this, 'parent::func3'), array($str));
-
+
try {
call_user_func_array(array($this, 'parent::func22'), array($str));
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
-
+
try {
call_user_func_array(array($this, 'parent::inexistent'), array($str));
} catch (\TypeError $e) {
@@ -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 parameter 1 to be a valid callback, cannot access private method A::func22()
-call_user_func_array() expects parameter 1 to be a valid callback, class 'A' does not have a method 'inexistent'
+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'
diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt
index cbd74df25a..07cc8025df 100644
--- a/Zend/tests/bug48770_3.phpt
+++ b/Zend/tests/bug48770_3.phpt
@@ -24,7 +24,7 @@ class B extends A {
public function func($str) {
call_user_func_array(array($this, 'self::func2'), array($str));
call_user_func_array(array($this, 'self::func3'), array($str));
-
+
try {
call_user_func_array(array($this, 'self::inexistent'), array($str));
} catch (\TypeError $e) {
@@ -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 parameter 1 to be a valid callback, class 'B' does not have a method 'inexistent'
+call_user_func_array() expects argument #1 ($function) to be a valid callback, class 'B' does not have a method 'inexistent'
diff --git a/Zend/tests/bug61273.phpt b/Zend/tests/bug61273.phpt
index aee35c6f4f..e9d67f9d2a 100644
--- a/Zend/tests/bug61273.phpt
+++ b/Zend/tests/bug61273.phpt
@@ -11,5 +11,5 @@ $args = array_fill(0, 64 * 1024 - 64, 0);
call_user_func_array(function(&$a) {}, $args);
echo strval("okey");
--EXPECTF--
-Warning: Parameter 1 to {closure}() expected to be a reference, value given in %sbug61273.php on line %d
+Warning: {closure}() expects argument #1 ($a) to be passed by reference, value given in %s on line %d
okey
diff --git a/Zend/tests/bug68446.phpt b/Zend/tests/bug68446.phpt
index 1f682af9aa..c9d833a37f 100644
--- a/Zend/tests/bug68446.phpt
+++ b/Zend/tests/bug68446.phpt
@@ -32,7 +32,7 @@ array(1) {
int(1)
}
-Fatal error: Uncaught TypeError: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): a(NULL)
#1 {main}
diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt
index 71ff19a0b5..0d4dc47004 100644
--- a/Zend/tests/bug70895.phpt
+++ b/Zend/tests/bug70895.phpt
@@ -20,6 +20,6 @@ try {
}
?>
--EXPECT--
-array_map() expects parameter 1 to be a valid callback, function '%n' not found or invalid function name
-array_map() expects parameter 1 to be a valid callback, function '%n %i' not found or invalid function name
-array_map() expects parameter 1 to be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name
+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
diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt
index fa6e96d83f..2a0fabd138 100644
--- a/Zend/tests/bug70898.phpt
+++ b/Zend/tests/bug70898.phpt
@@ -13,4 +13,4 @@ try {
}
?>
--EXPECT--
-array_map() expects parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
+array_map() expects argument #1 ($callback) to be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name
diff --git a/Zend/tests/bug72101.phpt b/Zend/tests/bug72101.phpt
index 23861958fd..04252a43a1 100644
--- a/Zend/tests/bug72101.phpt
+++ b/Zend/tests/bug72101.phpt
@@ -76,7 +76,7 @@ $foo->bar($a, $b, $c);
--EXPECTF--
Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61
Stack trace:
-#0 %sbug72101.php(8): {closure}(2, 'Parameter 1 to ...', '%s', 8)
+#0 %sbug72101.php(8): {closure}(2, 'MethodCallbackB...', '%s', 8)
#1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
#2 %sbug72101.php(19): PHPUnit_Framework_MockObject_Matcher->invoked(Object(PHPUnit_Framework_MockObject_Invocation_Static))
#3 %sbug72101.php(52): PHPUnit_Framework_MockObject_InvocationMocker->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static))
diff --git a/Zend/tests/bug72598.phpt b/Zend/tests/bug72598.phpt
index eeee510279..acf40cbba0 100644
--- a/Zend/tests/bug72598.phpt
+++ b/Zend/tests/bug72598.phpt
@@ -17,10 +17,10 @@ new class {
};
?>
--EXPECTF--
-Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11
+Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
object(class@anonymous)#1 (0) {
}
-Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598.php on line 11
+Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
object(class@anonymous)#1 (0) {
}
diff --git a/Zend/tests/bug72598_2.phpt b/Zend/tests/bug72598_2.phpt
index d58e18c978..75c4894dff 100644
--- a/Zend/tests/bug72598_2.phpt
+++ b/Zend/tests/bug72598_2.phpt
@@ -20,8 +20,8 @@ new class {
};
?>
--EXPECTF--
-Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14
+Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
int(0)
-Warning: Parameter 1 to ref() expected to be a reference, value given in %sbug72598_2.php on line 14
+Warning: ref() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
int(0)
diff --git a/Zend/tests/bug73954.phpt b/Zend/tests/bug73954.phpt
index fb0a6b8f3d..062d438b60 100644
--- a/Zend/tests/bug73954.phpt
+++ b/Zend/tests/bug73954.phpt
@@ -16,7 +16,7 @@ takes_int(log(tan(3.14)));
float(NAN)
bool(true)
-Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type int, float given, called in %s on line 9 and defined in %s:6
+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
Stack trace:
#0 %s(9): takes_int(NAN)
#1 {main}
diff --git a/Zend/tests/bug74164.phpt b/Zend/tests/bug74164.phpt
index b623dcb1db..e0dbed9a19 100644
--- a/Zend/tests/bug74164.phpt
+++ b/Zend/tests/bug74164.phpt
@@ -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: Parameter 1 to Foo\{closure}() expected to be a reference, value given in %sbug74164.php:%d
+Fatal error: Uncaught Exception: Foo\{closure}() expects argument #1 ($ref) to 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)
diff --git a/Zend/tests/call_user_func_001.phpt b/Zend/tests/call_user_func_001.phpt
index 3d2becdc78..8ad7656459 100644
--- a/Zend/tests/call_user_func_001.phpt
+++ b/Zend/tests/call_user_func_001.phpt
@@ -37,5 +37,5 @@ namespace testing {
?>
--EXPECT--
string(6) "foobar"
-call_user_func() expects parameter 1 to be a valid callback, cannot access private method testing\foo::priv()
-call_user_func() expects parameter 1 to be a valid callback, cannot access protected method testing\foo::prot()
+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()
diff --git a/Zend/tests/call_user_func_002.phpt b/Zend/tests/call_user_func_002.phpt
index cc07ffab16..3ac9308543 100644
--- a/Zend/tests/call_user_func_002.phpt
+++ b/Zend/tests/call_user_func_002.phpt
@@ -31,11 +31,11 @@ try {
?>
--EXPECTF--
string(3) "foo"
-call_user_func() expects parameter 1 to be a valid callback, class 'foo' not found
-call_user_func() expects parameter 1 to be a valid callback, class '' not found
+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
Warning: Undefined variable: foo in %s on line %d
-call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
+call_user_func() expects argument #1 ($function) to 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 parameter 1 to be a valid callback, first array member is not a valid class name or object
+call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
diff --git a/Zend/tests/call_user_func_006.phpt b/Zend/tests/call_user_func_006.phpt
index 16a59bcf5b..624ce2391c 100644
--- a/Zend/tests/call_user_func_006.phpt
+++ b/Zend/tests/call_user_func_006.phpt
@@ -21,8 +21,8 @@ var_dump($y);
?>
--EXPECTF--
-Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d
+Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
int(42)
-Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d
+Warning: Foo\bar() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
int(42)
diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt
index d3f2747c13..8efa3ab901 100644
--- a/Zend/tests/call_user_func_007.phpt
+++ b/Zend/tests/call_user_func_007.phpt
@@ -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: Parameter 1 to foo() expected to be a reference, value given in %s on line %d
+Warning: foo() expects argument #1 ($ref) to be passed by reference, value given in %s on line %d
array(0) {
}
diff --git a/Zend/tests/call_user_func_008.phpt b/Zend/tests/call_user_func_008.phpt
index 3e727e7f43..c710360a13 100644
--- a/Zend/tests/call_user_func_008.phpt
+++ b/Zend/tests/call_user_func_008.phpt
@@ -25,30 +25,30 @@ var_dump($i, $j);
?>
--EXPECTF--
-Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
+Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
-Warning: Parameter 2 to test() expected to be a 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
bool(true)
int(0)
int(0)
-Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
+Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
-Warning: Parameter 2 to test() expected to be a 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
bool(true)
int(0)
int(0)
-Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
+Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
-Warning: Parameter 2 to test() expected to be a 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
bool(true)
int(0)
int(0)
-Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
+Warning: test() expects argument #1 ($ref1) to be passed by reference, value given in %s on line %d
-Warning: Parameter 2 to test() expected to be a 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
bool(true)
int(0)
int(0)
diff --git a/Zend/tests/call_user_func_009.phpt b/Zend/tests/call_user_func_009.phpt
index d45380db15..ebbecd73e6 100644
--- a/Zend/tests/call_user_func_009.phpt
+++ b/Zend/tests/call_user_func_009.phpt
@@ -10,8 +10,8 @@ var_dump(\call_user_func('sort', []));
?>
--EXPECTF--
-Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d
+Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
bool(true)
-Warning: Parameter 1 to sort() expected to be a reference, value given in %s on line %d
+Warning: sort() expects argument #1 ($arg) to be passed by reference, value given in %s on line %d
bool(true)
diff --git a/Zend/tests/call_user_func_array_invalid_type.phpt b/Zend/tests/call_user_func_array_invalid_type.phpt
index d1c70f0fef..a7b5fb3cb7 100644
--- a/Zend/tests/call_user_func_array_invalid_type.phpt
+++ b/Zend/tests/call_user_func_array_invalid_type.phpt
@@ -15,4 +15,4 @@ try {
}
?>
--EXPECT--
-call_user_func_array() expects parameter 2 to be array, null given
+call_user_func_array() expects argument #2 ($args) to be of type array, null given
diff --git a/Zend/tests/closure_027.phpt b/Zend/tests/closure_027.phpt
index ab5fde2026..bffd69c11a 100644
--- a/Zend/tests/closure_027.phpt
+++ b/Zend/tests/closure_027.phpt
@@ -3,7 +3,7 @@ Closure 027: Testing Closure type-hint
--FILE--
<?php
-function test(closure $a) {
+function test(Closure $a) {
var_dump($a());
}
@@ -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: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): test(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/closure_059.phpt b/Zend/tests/closure_059.phpt
index 68fd10321f..c63e654f2d 100644
--- a/Zend/tests/closure_059.phpt
+++ b/Zend/tests/closure_059.phpt
@@ -33,6 +33,6 @@ try {
echo "Exception: " . $e->getMessage() . "\n";
}
--EXPECTF--
-Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
-Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
-Exception: Argument 1 passed to {closure}() must be an instance of A, instance of B %s
+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
diff --git a/Zend/tests/errmsg_013.phpt b/Zend/tests/errmsg_013.phpt
index 6346868679..74c7bc2e8e 100644
--- a/Zend/tests/errmsg_013.phpt
+++ b/Zend/tests/errmsg_013.phpt
@@ -1,5 +1,5 @@
--TEST--
-errmsg: default value for parameters with array type can only be an array or NULL
+errmsg: default value for parameters with array type can only be an array or null
--FILE--
<?php
diff --git a/Zend/tests/exception_017.phpt b/Zend/tests/exception_017.phpt
index 260cfbd8e2..4299ada5c0 100644
--- a/Zend/tests/exception_017.phpt
+++ b/Zend/tests/exception_017.phpt
@@ -28,7 +28,7 @@ Error: Cannot call abstract method C::foo() in %s:%d
Stack trace:
#0 {main}
-TypeError: Argument 1 passed to foo() must be callable, string given, called in %s on line %d and defined in %s:%d
+TypeError: foo() expects argument #1 ($x) to be of type callable, string given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(%d): foo('C::foo')
#1 {main}
diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt
index 6552141b73..e4684e942d 100644
--- a/Zend/tests/exception_handler_004.phpt
+++ b/Zend/tests/exception_handler_004.phpt
@@ -9,7 +9,7 @@ set_exception_handler(array("", ""));
echo "Done\n";
?>
--EXPECTF--
-Warning: set_exception_handler() expects the argument (fo) to 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() expects the argument (::) to 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
Done
diff --git a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt
index e47d03d5f6..c8977ece99 100644
--- a/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt
+++ b/Zend/tests/function_arguments/argument_count_incorrect_userland_strict.phpt
@@ -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
-Argument 1 passed to bat() must be of the type int, string given, called in %s
+bat() expects argument #1 ($foo) to be of type int, string given, called in %s on line %d
TypeError
-Argument 2 passed to bat() must be of the type string, int given, called in %s
+bat() expects argument #2 ($bar) to be of type string, int given, called in %s on line %d
diff --git a/Zend/tests/function_arguments/variadic_argument_type_error.phpt b/Zend/tests/function_arguments/variadic_argument_type_error.phpt
new file mode 100644
index 0000000000..ee244ab4a1
--- /dev/null
+++ b/Zend/tests/function_arguments/variadic_argument_type_error.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Call userland function with incorrect variadic argument type
+--FILE--
+<?php
+
+function foo($foo, int ...$bar) {}
+
+try {
+ foo(1, []);
+} catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+
+try {
+ foo(1, 1, 1, []);
+} catch (TypeError $exception) {
+ echo $exception->getMessage() . "\n";
+}
+
+--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
diff --git a/Zend/tests/generators/generator_with_type_check.phpt b/Zend/tests/generators/generator_with_type_check.phpt
index 12e6d46d76..90636406b4 100644
--- a/Zend/tests/generators/generator_with_type_check.phpt
+++ b/Zend/tests/generators/generator_with_type_check.phpt
@@ -6,7 +6,7 @@ function gen(array $a) { yield; }
gen(42);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check.php on line 3 and defined in %sgenerator_with_type_check.php:2
+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
Stack trace:
#0 %sgenerator_with_type_check.php(3): gen(42)
#1 {main}
diff --git a/Zend/tests/generators/generator_with_type_check_2.phpt b/Zend/tests/generators/generator_with_type_check_2.phpt
index d4ebbd2ad3..445c8f4a9f 100644
--- a/Zend/tests/generators/generator_with_type_check_2.phpt
+++ b/Zend/tests/generators/generator_with_type_check_2.phpt
@@ -18,5 +18,5 @@ try {
}
?>
--EXPECTF--
-Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check_2.php on line 4
-Argument 1 passed to gen() must be of the type array, int given, called in %sgenerator_with_type_check_2.php on line 10
+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
diff --git a/Zend/tests/generators/throw_not_an_exception.phpt b/Zend/tests/generators/throw_not_an_exception.phpt
index abf9a3c894..dcb1d3d0b0 100644
--- a/Zend/tests/generators/throw_not_an_exception.phpt
+++ b/Zend/tests/generators/throw_not_an_exception.phpt
@@ -12,7 +12,7 @@ $gen->throw(new stdClass);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Generator::throw() expects parameter 1 to be Throwable, object given in %s:%d
+Fatal error: Uncaught TypeError: Generator::throw() expects argument #1 ($exception) to be of type Throwable, object given in %s:%d
Stack trace:
#0 %s(%d): Generator->throw(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/methods-on-non-objects-call-user-func.phpt b/Zend/tests/methods-on-non-objects-call-user-func.phpt
index 63884abc79..5ccf9e0d26 100644
--- a/Zend/tests/methods-on-non-objects-call-user-func.phpt
+++ b/Zend/tests/methods-on-non-objects-call-user-func.phpt
@@ -10,4 +10,4 @@ try {
}
?>
--EXPECT--
-call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
+call_user_func() expects argument #1 ($function) to be a valid callback, first array member is not a valid class name or object
diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt
index 7acdffba82..cee6431be0 100644
--- a/Zend/tests/ns_071.phpt
+++ b/Zend/tests/ns_071.phpt
@@ -18,7 +18,7 @@ new bar(new \stdclass);
--EXPECTF--
NULL
-Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must be of the type array or null, object given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/ns_072.phpt b/Zend/tests/ns_072.phpt
index c422eedd4e..6429632658 100644
--- a/Zend/tests/ns_072.phpt
+++ b/Zend/tests/ns_072.phpt
@@ -30,7 +30,7 @@ object(foo\test)#%d (0) {
}
NULL
-Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo or be null, instance of stdClass given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): foo\bar->__construct(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/object_types/return_type_in_class.phpt b/Zend/tests/object_types/return_type_in_class.phpt
index 3edb015df7..44e3fbf871 100644
--- a/Zend/tests/object_types/return_type_in_class.phpt
+++ b/Zend/tests/object_types/return_type_in_class.phpt
@@ -18,7 +18,7 @@ $three = new class extends Two {
};
$three->a();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d
Stack trace:
#0 %s(%d): Two@anonymous->a()
#1 {main}
diff --git a/Zend/tests/object_types/return_type_in_function.phpt b/Zend/tests/object_types/return_type_in_function.phpt
index 61f6845b47..1c60759bb3 100644
--- a/Zend/tests/object_types/return_type_in_function.phpt
+++ b/Zend/tests/object_types/return_type_in_function.phpt
@@ -8,7 +8,7 @@ function a() : object {
}
a();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of a() must be an object, int returned in %s:4
+Fatal error: Uncaught TypeError: Return value of a() must be of type object, int returned in %s:4
Stack trace:
#0 %s(6): a()
#1 {main}
diff --git a/Zend/tests/object_types/return_type_inheritance_in_class.phpt b/Zend/tests/object_types/return_type_inheritance_in_class.phpt
index 23528531ec..21dec61e30 100644
--- a/Zend/tests/object_types/return_type_inheritance_in_class.phpt
+++ b/Zend/tests/object_types/return_type_inheritance_in_class.phpt
@@ -18,7 +18,7 @@ $three = new class extends Two {
};
$three->a();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d
Stack trace:
#0 %s(%d): Two@anonymous->a()
#1 {main}
diff --git a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt
index 793cc980aa..b1af678911 100644
--- a/Zend/tests/object_types/return_type_inheritance_in_interface.phpt
+++ b/Zend/tests/object_types/return_type_inheritance_in_interface.phpt
@@ -18,7 +18,7 @@ $three = new class implements Two {
};
$three->a();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be an object, int returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of Two@anonymous::a() must be of type object, int returned in %s:%d
Stack trace:
#0 %s(%d): Two@anonymous->a()
#1 {main}
diff --git a/Zend/tests/object_types/type_hint_in_class_method.phpt b/Zend/tests/object_types/type_hint_in_class_method.phpt
index f8814e4bbb..098bfc0c52 100644
--- a/Zend/tests/object_types/type_hint_in_class_method.phpt
+++ b/Zend/tests/object_types/type_hint_in_class_method.phpt
@@ -11,7 +11,7 @@ $one = new One();
$one->a(new One());
$one->a(123);
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to One::a() must be an object, int given, called in %s:4
+Fatal error: Uncaught TypeError: One::a() expects argument #1 ($obj) to be of type object, int given, called in %s:%d
Stack trace:
#0 %s(9): One->a(123)
#1 {main}
diff --git a/Zend/tests/object_types/type_hint_in_function.phpt b/Zend/tests/object_types/type_hint_in_function.phpt
index 39e075efdb..e834997f4d 100644
--- a/Zend/tests/object_types/type_hint_in_function.phpt
+++ b/Zend/tests/object_types/type_hint_in_function.phpt
@@ -9,7 +9,7 @@ function a(object $obj) {}
a(new A());
a(123);
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to a() must be an object, int given, called in %s.php on line 7 and defined in %s:4
+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
Stack trace:
#0 %s(7): a(123)
#1 {main}
diff --git a/Zend/tests/objects_022.phpt b/Zend/tests/objects_022.phpt
index d5a695739f..ce2d2f7c00 100644
--- a/Zend/tests/objects_022.phpt
+++ b/Zend/tests/objects_022.phpt
@@ -36,7 +36,7 @@ object(bar)#%d (0) {
object(baz)#%d (0) {
}
-Fatal error: Uncaught TypeError: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): foo->testFoo(Object(stdClass))
#1 {main}
diff --git a/Zend/tests/return_types/001.phpt b/Zend/tests/return_types/001.phpt
index 2b87a562f6..fc2bc326a9 100644
--- a/Zend/tests/return_types/001.phpt
+++ b/Zend/tests/return_types/001.phpt
@@ -7,7 +7,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, none returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of type array, none returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/002.phpt b/Zend/tests/return_types/002.phpt
index 615317cf83..07101ca760 100644
--- a/Zend/tests/return_types/002.phpt
+++ b/Zend/tests/return_types/002.phpt
@@ -8,7 +8,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of type array, null returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/003.phpt b/Zend/tests/return_types/003.phpt
index ed78d51823..5d60da25ed 100644
--- a/Zend/tests/return_types/003.phpt
+++ b/Zend/tests/return_types/003.phpt
@@ -7,7 +7,7 @@ function test1() : array {
}
test1();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, int returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of type array, int returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/004.phpt b/Zend/tests/return_types/004.phpt
index 6098d51334..eae7018ded 100644
--- a/Zend/tests/return_types/004.phpt
+++ b/Zend/tests/return_types/004.phpt
@@ -8,7 +8,7 @@ function test1() : array {
test1();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of test1() must be of the type array, string returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of test1() must be of type array, string returned in %s:%d
Stack trace:
#0 %s(%d): test1()
#1 {main}
diff --git a/Zend/tests/return_types/005.phpt b/Zend/tests/return_types/005.phpt
index f8d666fae5..6313ae69ce 100644
--- a/Zend/tests/return_types/005.phpt
+++ b/Zend/tests/return_types/005.phpt
@@ -13,7 +13,7 @@ class qux {
$qux = new qux();
$qux->foo();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of qux::foo() must be of type foo, qux returned in %s:%d
Stack trace:
#0 %s(%d): qux->foo()
#1 {main}
diff --git a/Zend/tests/return_types/010.phpt b/Zend/tests/return_types/010.phpt
index 2cfe97dac2..6ff9d7f25c 100644
--- a/Zend/tests/return_types/010.phpt
+++ b/Zend/tests/return_types/010.phpt
@@ -9,7 +9,7 @@ function &foo(array &$in) : array {
$array = [1, 2, 3];
var_dump(foo($array));
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of foo() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo() must be of type array, null returned in %s:%d
Stack trace:
#0 %s(%d): foo(Array)
#1 {main}
diff --git a/Zend/tests/return_types/013.phpt b/Zend/tests/return_types/013.phpt
index 5b2c06748d..1cbdd6184f 100644
--- a/Zend/tests/return_types/013.phpt
+++ b/Zend/tests/return_types/013.phpt
@@ -14,7 +14,7 @@ class foo {
$baz = new foo();
var_dump($func=$baz->bar(), $func());
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of the type array, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo::{closure}() must be of type array, null returned in %s:%d
Stack trace:
#0 %s(%d): foo->{closure}()
#1 {main}
diff --git a/Zend/tests/return_types/028.phpt b/Zend/tests/return_types/028.phpt
index 5e69006af7..d50b09c3f6 100644
--- a/Zend/tests/return_types/028.phpt
+++ b/Zend/tests/return_types/028.phpt
@@ -17,4 +17,4 @@ try {
?>
--EXPECTF--
-Return value of foo() must be an instance of stdClass, array returned in %s on line %d
+Return value of foo() must be of type stdClass, array returned in %s on line %d
diff --git a/Zend/tests/return_types/029.phpt b/Zend/tests/return_types/029.phpt
index 5741763abb..0e25dea559 100644
--- a/Zend/tests/return_types/029.phpt
+++ b/Zend/tests/return_types/029.phpt
@@ -21,7 +21,7 @@ Stack trace:
#0 %s(%d): foo()
#1 {main}
-Next TypeError: Return value of foo() must be of the type array, null returned in %s29.php:%d
+Next TypeError: Return value of foo() must be of type array, null returned in %s29.php:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/return_types/030.phpt b/Zend/tests/return_types/030.phpt
index 8117a7d7ce..907d47d66a 100644
--- a/Zend/tests/return_types/030.phpt
+++ b/Zend/tests/return_types/030.phpt
@@ -16,7 +16,7 @@ foo(0);
ok
ok
-Fatal error: Uncaught TypeError: Return value of foo() must be of the type array or null, int returned in %s030.php:3
+Fatal error: Uncaught TypeError: Return value of foo() must be of type ?array, int returned in %s030.php:3
Stack trace:
#0 %s030.php(10): foo(0)
#1 {main}
diff --git a/Zend/tests/return_types/bug70557.phpt b/Zend/tests/return_types/bug70557.phpt
index 5917197045..af8b92fb62 100644
--- a/Zend/tests/return_types/bug70557.phpt
+++ b/Zend/tests/return_types/bug70557.phpt
@@ -16,4 +16,4 @@ try {
}
?>
--EXPECT--
-string(68) "Return value of getNumber() must be of the type int, string returned"
+string(64) "Return value of getNumber() must be of type int, string returned"
diff --git a/Zend/tests/return_types/bug71092.phpt b/Zend/tests/return_types/bug71092.phpt
index abc43356bc..ed9a082349 100644
--- a/Zend/tests/return_types/bug71092.phpt
+++ b/Zend/tests/return_types/bug71092.phpt
@@ -16,7 +16,7 @@ function boom(): array {
boom();
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of boom() must be of the type array, null returned in %sbug71092.php:%d
+Fatal error: Uncaught TypeError: Return value of boom() must be of type array, null returned in %sbug71092.php:%d
Stack trace:
#0 %s(%d): boom()
#1 {main}
diff --git a/Zend/tests/return_types/internal_functions001.phpt b/Zend/tests/return_types/internal_functions001.phpt
index 7ec5b9c08f..14a60c83b4 100644
--- a/Zend/tests/return_types/internal_functions001.phpt
+++ b/Zend/tests/return_types/internal_functions001.phpt
@@ -11,4 +11,4 @@ if (!PHP_DEBUG) die('skip requires debug build');
zend_test_array_return();
?>
--EXPECTF--
-Fatal error: Return value of zend_test_array_return() must be of the type array, null returned in %s on line %d
+Fatal error: Return value of zend_test_array_return() must be of type array, null returned in %s on line %d
diff --git a/Zend/tests/return_types/rfc001.phpt b/Zend/tests/return_types/rfc001.phpt
index 3fdbf3443c..cbe2335afb 100644
--- a/Zend/tests/return_types/rfc001.phpt
+++ b/Zend/tests/return_types/rfc001.phpt
@@ -9,7 +9,7 @@ function get_config(): array {
get_config();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of get_config() must be of the type array, int returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of get_config() must be of type array, int returned in %s:%d
Stack trace:
#0 %s(%d): get_config()
#1 {main}
diff --git a/Zend/tests/return_types/rfc003.phpt b/Zend/tests/return_types/rfc003.phpt
index 6b9cc81c69..76a77c07c4 100644
--- a/Zend/tests/return_types/rfc003.phpt
+++ b/Zend/tests/return_types/rfc003.phpt
@@ -8,7 +8,7 @@ function foo(): DateTime {
foo();
--EXPECTF--
-Fatal error: Uncaught TypeError: Return value of foo() must be an instance of DateTime, null returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of foo() must be of type DateTime, null returned in %s:%d
Stack trace:
#0 %s(%d): foo()
#1 {main}
diff --git a/Zend/tests/trait_type_errors.phpt b/Zend/tests/trait_type_errors.phpt
index 50f5d619ad..1d29714a2f 100644
--- a/Zend/tests/trait_type_errors.phpt
+++ b/Zend/tests/trait_type_errors.phpt
@@ -38,6 +38,6 @@ try {
?>
--EXPECTF--
-Return value of C::test1() must be of the type int, string returned
-Argument 1 passed to C::test2() must be of the type int, string given, called in %s on line %d
-Argument 1 passed to C::test3() must be of the type int, string given, called in %s on line %d
+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
diff --git a/Zend/tests/type_declarations/array_001.phpt b/Zend/tests/type_declarations/array_001.phpt
index 09af9a98f2..0e08bd8b7f 100644
--- a/Zend/tests/type_declarations/array_001.phpt
+++ b/Zend/tests/type_declarations/array_001.phpt
@@ -12,7 +12,7 @@ foo(123);
--EXPECTF--
3
-Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, int given, called in %s on line 7 and defined in %s:2
+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
Stack trace:
#0 %s(%d): foo(123)
#1 {main}
diff --git a/Zend/tests/type_declarations/callable_001.phpt b/Zend/tests/type_declarations/callable_001.phpt
index d93e70923a..e6c2702235 100644
--- a/Zend/tests/type_declarations/callable_001.phpt
+++ b/Zend/tests/type_declarations/callable_001.phpt
@@ -29,7 +29,7 @@ array(2) {
string(3) "foo"
}
-Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be callable, array given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): foo(Array)
#1 {main}
diff --git a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt
index 9773775ae4..5ad7bd17fc 100644
--- a/Zend/tests/type_declarations/explicit_weak_include_strict.phpt
+++ b/Zend/tests/type_declarations/explicit_weak_include_strict.phpt
@@ -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: Argument 1 passed to takes_int() must be of the type int, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
+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
Stack trace:
#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
diff --git a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
index 8aec0c009f..661616fb92 100644
--- a/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
+++ b/Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
@@ -8,7 +8,7 @@ foo(null);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be an instance of bar, null given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): foo(NULL)
#1 {main}
diff --git a/Zend/tests/type_declarations/internal_function_strict_mode.phpt b/Zend/tests/type_declarations/internal_function_strict_mode.phpt
index 1019aa5024..b3b9adc9d3 100644
--- a/Zend/tests/type_declarations/internal_function_strict_mode.phpt
+++ b/Zend/tests/type_declarations/internal_function_strict_mode.phpt
@@ -28,8 +28,8 @@ try {
?>
--EXPECT--
*** Trying Ord With Integer
-*** Caught ord() expects parameter 1 to be string, int given
+*** Caught ord() expects argument #1 ($character) to be of type string, int given
*** Trying Array Map With Invalid Callback
-*** Caught array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
+*** Caught array_map() expects argument #1 ($callback) to be a valid callback, first array member is not a valid class name or object
*** Trying Strlen With Float
-*** Caught strlen() expects parameter 1 to be string, float given
+*** Caught strlen() expects argument #1 ($str) to be of type string, float given
diff --git a/Zend/tests/type_declarations/iterable_001.phpt b/Zend/tests/type_declarations/iterable_001.phpt
index b6755c49b9..856dc63c4d 100644
--- a/Zend/tests/type_declarations/iterable_001.phpt
+++ b/Zend/tests/type_declarations/iterable_001.phpt
@@ -44,4 +44,4 @@ object(ArrayIterator)#1 (1) {
int(3)
}
}
-Argument 1 passed to test() must be iterable, int given, called in %s on line %d
+test() expects argument #1 ($iterable) to be of type iterable, int given, called in %s on line %d
diff --git a/Zend/tests/type_declarations/iterable_003.phpt b/Zend/tests/type_declarations/iterable_003.phpt
index 0b6c032b9f..eda77d490b 100644
--- a/Zend/tests/type_declarations/iterable_003.phpt
+++ b/Zend/tests/type_declarations/iterable_003.phpt
@@ -29,4 +29,4 @@ array(0) {
}
object(Generator)#2 (0) {
}
-Return value of baz() must be iterable, int returned
+Return value of baz() must be of type iterable, int returned
diff --git a/Zend/tests/type_declarations/scalar_basic.phpt b/Zend/tests/type_declarations/scalar_basic.phpt
index 1253f48c16..ef10e67ac0 100644
--- a/Zend/tests/type_declarations/scalar_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_basic.phpt
@@ -78,16 +78,16 @@ E_NOTICE: A non well formed numeric value encountered on line %d
int(1)
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying int(%d)
int(%d)
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to 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 Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
*** Trying object(stdClass)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying object(Stringable)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying resource(%d) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to 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 Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
*** Trying object(stdClass)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying object(Stringable)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying resource(%d) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to 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 Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
*** Trying object(stdClass)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to 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 Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to 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 Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
*** Trying object(stdClass)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying object(Stringable)#%s (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying resource(%d) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/scalar_constant_defaults.phpt b/Zend/tests/type_declarations/scalar_constant_defaults.phpt
index e42cb32bde..28f0252cdf 100644
--- a/Zend/tests/type_declarations/scalar_constant_defaults.phpt
+++ b/Zend/tests/type_declarations/scalar_constant_defaults.phpt
@@ -96,9 +96,9 @@ float(10.7)
Testing string add val
string(14) "this is a test"
Testing int with default null constant
-Argument 1 passed to int_val_default_null() must be of the type int, null given, called in %s on line %d
+int_val_default_null() expects argument #1 ($a) to be of type int, null given, called in %s on line %d
Testing int with null null constant
-Argument 1 passed to int_val_default_null() must be of the type int, null given, called in %s on line %d
+int_val_default_null() expects argument #1 ($a) to 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
diff --git a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
index d897bb4822..66d56e72df 100644
--- a/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
+++ b/Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
@@ -13,7 +13,7 @@ var_dump(int_val());
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the type int, string given, called in %s on line %d and defined in %s:%d
+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
Stack trace:
#0 %s(%d): int_val()
#1 {main}
diff --git a/Zend/tests/type_declarations/scalar_null.phpt b/Zend/tests/type_declarations/scalar_null.phpt
index d149053fd2..ab9647ba9c 100644
--- a/Zend/tests/type_declarations/scalar_null.phpt
+++ b/Zend/tests/type_declarations/scalar_null.phpt
@@ -27,13 +27,13 @@ echo PHP_EOL . "Done";
?>
--EXPECTF--
Testing int:
-*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
Testing float:
-*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
Testing string:
-*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
Testing bool:
-*** Caught Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
Testing int nullable:
NULL
Testing float nullable:
diff --git a/Zend/tests/type_declarations/scalar_return_basic.phpt b/Zend/tests/type_declarations/scalar_return_basic.phpt
index c69196269f..9ee50f8457 100644
--- a/Zend/tests/type_declarations/scalar_return_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_return_basic.phpt
@@ -75,30 +75,30 @@ int(1)
E_NOTICE: A non well formed numeric value encountered on line %d
int(1)
*** Trying string(1) "a"
-*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d
*** Trying string(0) ""
-*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d
*** Trying int(2147483647)
int(2147483647)
*** Trying float(NAN)
-*** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, float returned in %s on line %d
*** Trying bool(true)
int(1)
*** Trying bool(false)
int(0)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, resource returned in %s on line %d
Testing 'float' type:
*** Trying int(1)
@@ -113,9 +113,9 @@ float(1.5)
E_NOTICE: A non well formed numeric value encountered on line %d
float(1)
*** Trying string(1) "a"
-*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d
*** Trying string(0) ""
-*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d
*** Trying int(2147483647)
float(2147483647)
*** Trying float(NAN)
@@ -125,18 +125,18 @@ float(1)
*** Trying bool(false)
float(0)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, resource returned in %s on line %d
Testing 'string' type:
*** Trying int(1)
@@ -162,18 +162,18 @@ string(1) "1"
*** Trying bool(false)
string(0) ""
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type string, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type string, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type string, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
string(6) "foobar"
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, resource returned in %s on line %d
Testing 'bool' type:
*** Trying int(1)
@@ -199,17 +199,17 @@ bool(true)
*** Trying bool(false)
bool(false)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type bool, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type bool, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type bool, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, resource returned in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
index 6f2ff11eb2..fa7aacdef3 100644
--- a/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
+++ b/Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
@@ -75,30 +75,30 @@ int(1)
E_NOTICE: A non well formed numeric value encountered on line %d
int(1)
*** Trying string(1) "a"
-*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d
*** Trying string(0) ""
-*** Caught Return value of {closure}() must be of the type int, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, string returned in %s on line %d
*** Trying int(9223372036854775807)
int(9223372036854775807)
*** Trying float(NAN)
-*** Caught Return value of {closure}() must be of the type int, float returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, float returned in %s on line %d
*** Trying bool(true)
int(1)
*** Trying bool(false)
int(0)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type int, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type int, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type int, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type int, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type int, resource returned in %s on line %d
Testing 'float' type:
*** Trying int(1)
@@ -113,9 +113,9 @@ float(1.5)
E_NOTICE: A non well formed numeric value encountered on line %d
float(1)
*** Trying string(1) "a"
-*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d
*** Trying string(0) ""
-*** Caught Return value of {closure}() must be of the type float, string returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, string returned in %s on line %d
*** Trying int(9223372036854775807)
float(9.2233720368548E+18)
*** Trying float(NAN)
@@ -125,18 +125,18 @@ float(1)
*** Trying bool(false)
float(0)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type float, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type float, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type float, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type float, resource returned in %s on line %d
Testing 'string' type:
*** Trying int(1)
@@ -162,18 +162,18 @@ string(1) "1"
*** Trying bool(false)
string(0) ""
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type string, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type string, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type string, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
string(6) "foobar"
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type string, resource returned in %s on line %d
Testing 'bool' type:
*** Trying int(1)
@@ -199,17 +199,17 @@ bool(true)
*** Trying bool(false)
bool(false)
*** Trying NULL
-*** Caught Return value of {closure}() must be of the type bool, null returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, null returned in %s on line %d
*** Trying array(0) {
}
-*** Caught Return value of {closure}() must be of the type bool, array returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, array returned in %s on line %d
*** Trying object(stdClass)#6 (0) {
}
-*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d
*** Trying object(Stringable)#7 (0) {
}
-*** Caught Return value of {closure}() must be of the type bool, object returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, object returned in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Return value of {closure}() must be of the type bool, resource returned in %s on line %d
+*** Caught Return value of {closure}() must be of type bool, resource returned in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt
index 78b404f9f1..89ab6a024b 100644
--- a/Zend/tests/type_declarations/scalar_strict.phpt
+++ b/Zend/tests/type_declarations/scalar_strict.phpt
@@ -60,52 +60,52 @@ Testing 'int' type:
int(1)
*** Trying string(1) "1"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying string(2) "1a"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying int(2147483647)
int(2147483647)
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying bool(true)
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to 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 Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
Testing 'string' type:
*** Trying int(1)
-*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
*** Trying string(1) "1"
string(1) "1"
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to 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 Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
*** Trying bool(true)
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
Testing 'bool' type:
*** Trying int(1)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
*** Trying string(1) "1"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
*** Trying string(2) "1a"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying int(2147483647)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to 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 Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt
index d6d38213a4..0f39700b7f 100644
--- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt
@@ -60,52 +60,52 @@ Testing 'int' type:
int(1)
*** Trying string(1) "1"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying string(2) "1a"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying int(9223372036854775807)
int(9223372036854775807)
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying bool(true)
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying int(9223372036854775807)
float(9.2233720368548E+18)
@@ -137,42 +137,42 @@ float(9.2233720368548E+18)
float(NAN)
*** Trying bool(true)
-*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
Testing 'string' type:
*** Trying int(1)
-*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
*** Trying string(1) "1"
string(1) "1"
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to 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 Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
*** Trying bool(true)
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying bool(false)
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying NULL
-*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
Testing 'bool' type:
*** Trying int(1)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
*** Trying string(1) "1"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying float(1)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
*** Trying float(1.5)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
*** Trying string(2) "1a"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying string(1) "a"
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying string(0) ""
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, string given, called in %s on line %d
*** Trying int(9223372036854775807)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
*** Trying float(NAN)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to 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 Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
*** Trying array(0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
*** Trying object(stdClass)#5 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying object(Stringable)#6 (0) {
}
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying resource(5) of type (stream)
-*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt
index 016757e671..d3050314f4 100644
--- a/Zend/tests/type_declarations/scalar_strict_basic.phpt
+++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt
@@ -57,28 +57,28 @@ Testing 'int' type:
int(1)
*** Trying float value
-*** Caught Argument 1 passed to {closure}() must be of the type int, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, float given, called in %s on line %d
*** Trying string value
-*** Caught Argument 1 passed to {closure}() must be of the type int, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, string given, called in %s on line %d
*** Trying true value
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying false value
-*** Caught Argument 1 passed to {closure}() must be of the type int, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, bool given, called in %s on line %d
*** Trying null value
-*** Caught Argument 1 passed to {closure}() must be of the type int, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, null given, called in %s on line %d
*** Trying array value
-*** Caught Argument 1 passed to {closure}() must be of the type int, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, array given, called in %s on line %d
*** Trying object value
-*** Caught Argument 1 passed to {closure}() must be of the type int, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to be of type int, object given, called in %s on line %d
*** Trying resource value
-*** Caught Argument 1 passed to {closure}() must be of the type int, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($i) to 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 Argument 1 passed to {closure}() must be of the type float, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, string given, called in %s on line %d
*** Trying true value
-*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying false value
-*** Caught Argument 1 passed to {closure}() must be of the type float, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, bool given, called in %s on line %d
*** Trying null value
-*** Caught Argument 1 passed to {closure}() must be of the type float, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, null given, called in %s on line %d
*** Trying array value
-*** Caught Argument 1 passed to {closure}() must be of the type float, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, array given, called in %s on line %d
*** Trying object value
-*** Caught Argument 1 passed to {closure}() must be of the type float, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, object given, called in %s on line %d
*** Trying resource value
-*** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($f) to be of type float, resource given, called in %s on line %d
Testing 'string' type:
*** Trying integer value
-*** Caught Argument 1 passed to {closure}() must be of the type string, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, int given, called in %s on line %d
*** Trying float value
-*** Caught Argument 1 passed to {closure}() must be of the type string, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, float given, called in %s on line %d
*** Trying string value
string(1) "1"
*** Trying true value
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying false value
-*** Caught Argument 1 passed to {closure}() must be of the type string, bool given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, bool given, called in %s on line %d
*** Trying null value
-*** Caught Argument 1 passed to {closure}() must be of the type string, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, null given, called in %s on line %d
*** Trying array value
-*** Caught Argument 1 passed to {closure}() must be of the type string, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, array given, called in %s on line %d
*** Trying object value
-*** Caught Argument 1 passed to {closure}() must be of the type string, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, object given, called in %s on line %d
*** Trying resource value
-*** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($s) to be of type string, resource given, called in %s on line %d
Testing 'bool' type:
*** Trying integer value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, int given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, int given, called in %s on line %d
*** Trying float value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, float given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, float given, called in %s on line %d
*** Trying string value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, string given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to 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 Argument 1 passed to {closure}() must be of the type bool, null given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, null given, called in %s on line %d
*** Trying array value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, array given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, array given, called in %s on line %d
*** Trying object value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, object given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, object given, called in %s on line %d
*** Trying resource value
-*** Caught Argument 1 passed to {closure}() must be of the type bool, resource given, called in %s on line %d
+*** Caught {closure}() expects argument #1 ($b) to be of type bool, resource given, called in %s on line %d
Done
diff --git a/Zend/tests/type_declarations/static_type_return.phpt b/Zend/tests/type_declarations/static_type_return.phpt
index 4a04cfff78..a5c8921e0a 100644
--- a/Zend/tests/type_declarations/static_type_return.phpt
+++ b/Zend/tests/type_declarations/static_type_return.phpt
@@ -75,7 +75,7 @@ object(B)#3 (0) {
object(A)#3 (0) {
}
-Return value of A::test2() must be an instance of B, instance of A returned
+Return value of A::test2() must be of type B, A returned
object(A)#3 (0) {
}
@@ -84,8 +84,8 @@ object(C)#3 (0) {
object(A)#3 (0) {
}
-Return value of A::test4() must be of type B|array, instance of A returned
+Return value of A::test4() must be of type B|array, A returned
-Return value of {closure}() must be an instance of static, instance of stdClass returned
+Return value of {closure}() must be of type static, stdClass returned
object(A)#1 (0) {
}
diff --git a/Zend/tests/type_declarations/static_type_trait.phpt b/Zend/tests/type_declarations/static_type_trait.phpt
index ede9fd62b1..41f861643b 100644
--- a/Zend/tests/type_declarations/static_type_trait.phpt
+++ b/Zend/tests/type_declarations/static_type_trait.phpt
@@ -31,7 +31,7 @@ object(P)#2 (0) {
object(P)#2 (0) {
}
-Fatal error: Uncaught TypeError: Return value of C::test() must be an instance of P, instance of C returned in %s:%d
+Fatal error: Uncaught TypeError: Return value of C::test() must be of type P, C returned in %s:%d
Stack trace:
#0 %s(%d): C->test(Object(C))
#1 {main}
diff --git a/Zend/tests/type_declarations/strict_call_weak.phpt b/Zend/tests/type_declarations/strict_call_weak.phpt
index d8dc93bc1e..e20524b2d5 100644
--- a/Zend/tests/type_declarations/strict_call_weak.phpt
+++ b/Zend/tests/type_declarations/strict_call_weak.phpt
@@ -13,7 +13,7 @@ require 'strict_call_weak_2.inc';
function_declared_in_weak_mode(1.0);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type int, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
+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
Stack trace:
#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
diff --git a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt
index e083d586e6..b6b382e5cc 100644
--- a/Zend/tests/type_declarations/strict_call_weak_explicit.phpt
+++ b/Zend/tests/type_declarations/strict_call_weak_explicit.phpt
@@ -13,7 +13,7 @@ require 'strict_call_weak_explicit_2.inc';
function_declared_in_weak_mode(1.0);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type int, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
+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
Stack trace:
#0 %s(%d): function_declared_in_weak_mode(1)
#1 {main}
diff --git a/Zend/tests/type_declarations/typed_properties_078.phpt b/Zend/tests/type_declarations/typed_properties_078.phpt
index c92ed5afc4..07e9384b6f 100644
--- a/Zend/tests/type_declarations/typed_properties_078.phpt
+++ b/Zend/tests/type_declarations/typed_properties_078.phpt
@@ -1,5 +1,5 @@
--TEST--
-Typed references must be kept track of and always be only the intersection of the types currently holding that reference
+Typed references must be kept track of and always be only the intersection of the type currently holding that reference
--FILE--
<?php
diff --git a/Zend/tests/type_declarations/union_types/legal_default_values.phpt b/Zend/tests/type_declarations/union_types/legal_default_values.phpt
index 2807397734..36f16da69a 100644
--- a/Zend/tests/type_declarations/union_types/legal_default_values.phpt
+++ b/Zend/tests/type_declarations/union_types/legal_default_values.phpt
@@ -1,5 +1,5 @@
--TEST--
-The default value must be legal for one of the types in the union
+The default value must be legal for one of the type in the union
--FILE--
<?php
diff --git a/Zend/tests/type_declarations/union_types/multiple_classes.phpt b/Zend/tests/type_declarations/union_types/multiple_classes.phpt
index 72d2e6c291..3187415586 100644
--- a/Zend/tests/type_declarations/union_types/multiple_classes.phpt
+++ b/Zend/tests/type_declarations/union_types/multiple_classes.phpt
@@ -68,7 +68,7 @@ int(42)
int(42)
int(42)
Cannot assign stdClass to property Test::$prop of type X|Y|Z|int
-Argument 1 passed to Test::method() must be of type X|Y|Z|int, instance of stdClass given, called in %s on line %d
+Test::method() expects argument #1 ($arg) to be of type X|Y|Z|int, stdClass given, called in %s on line %d
object(X)#4 (0) {
}
object(X)#6 (0) {
diff --git a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt
index f098b638dc..81c75328d6 100644
--- a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt
+++ b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt
@@ -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('1 passed to {closure}()', '...', $msg);
+ $msg = str_replace('{closure}() expects argument #1', 'Argument ...', $msg);
echo $msg;
}
echo "\n";
@@ -70,86 +70,86 @@ Type int|float:
42 => 42
42.0 => 42.0
INF => INF
-"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
+"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
Type int|float|false:
42 => 42
42.0 => 42.0
INF => INF
-"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
+"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
false => false
-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
+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
Type int|float|bool:
42 => 42
42.0 => 42.0
INF => INF
-"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
+"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
true => true
false => false
-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
+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
Type int|bool:
42 => 42
-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
+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
true => true
false => false
-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
+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
Type int|string|null:
42 => 42
-42.0 => Argument ... must be of type string|int|null, float given
-INF => Argument ... must be of type string|int|null, float given
+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" => "42"
"42.0" => "42.0"
"42x" => "42x"
"x" => "x"
"" => ""
-true => Argument ... must be of type string|int|null, bool given
-false => Argument ... must be of type string|int|null, bool given
+true => Argument ... ($arg) to be of type string|int|null, bool given
+false => Argument ... ($arg) to be of type string|int|null, bool given
null => null
-[] => 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
+[] => 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
Type string|bool:
-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 => 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" => "42"
"42.0" => "42.0"
"42x" => "42x"
@@ -157,55 +157,55 @@ INF => Argument ... must be of type string|bool, float given
"" => ""
true => true
false => false
-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
+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
Type float|array:
42 => 42.0
42.0 => 42.0
INF => INF
-"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
+"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
[] => []
-new stdClass => Argument ... must be of type array|float, object given
-new WithToString => Argument ... must be of type array|float, object 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
Type string|array:
-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 => 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" => "42"
"42.0" => "42.0"
"42x" => "42x"
"x" => "x"
"" => ""
-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
+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
[] => []
-new stdClass => Argument ... must be of type array|string, object given
-new WithToString => Argument ... must be of type array|string, object 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
Type bool|array:
-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
+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
true => true
false => false
-null => Argument ... must be of type array|bool, null given
+null => Argument ... ($arg) to be of type array|bool, null given
[] => []
-new stdClass => Argument ... must be of type array|bool, object given
-new WithToString => Argument ... must be of type array|bool, object 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
diff --git a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt
index 441eaab854..c48e95f640 100644
--- a/Zend/tests/type_declarations/union_types/type_checking_weak.phpt
+++ b/Zend/tests/type_declarations/union_types/type_checking_weak.phpt
@@ -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('1 passed to {closure}()', '...', $msg);
+ $msg = str_replace('{closure}() expects argument #1', '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 ... must be of type int|float, string given
-"" => Argument ... must 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 => 1
false => 0
-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
+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
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 ... must be of type int|float|false, string given
-"" => Argument ... must 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 => 1
false => false
-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
+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
Type int|float|bool:
42 => 42
@@ -107,10 +107,10 @@ INF => INF
"" => false
true => true
false => false
-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
+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
Type int|bool:
42 => 42
@@ -123,10 +123,10 @@ INF => true
"" => false
true => true
false => false
-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
+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
Type int|string|null:
42 => 42
@@ -140,8 +140,8 @@ INF => "INF"
true => 1
false => 0
null => null
-[] => Argument ... must be of type string|int|null, array given
-new stdClass => Argument ... must be of type string|int|null, object given
+[] => 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 => "__toString()"
Type string|bool:
@@ -155,9 +155,9 @@ INF => "INF"
"" => ""
true => true
false => false
-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
+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 => "__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 ... must be of type array|float, string given
-"" => Argument ... must 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 => 1.0
false => 0.0
-null => Argument ... must be of type array|float, null given
+null => Argument ... ($arg) to be of type array|float, null given
[] => []
-new stdClass => Argument ... must be of type array|float, object given
-new WithToString => Argument ... must be of type array|float, object 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
Type string|array:
42 => "42"
@@ -187,9 +187,9 @@ INF => "INF"
"" => ""
true => "1"
false => ""
-null => Argument ... must be of type array|string, null given
+null => Argument ... ($arg) to be of type array|string, null given
[] => []
-new stdClass => Argument ... must be of type array|string, object given
+new stdClass => Argument ... ($arg) to 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 ... must be of type array|bool, null given
+null => Argument ... ($arg) to be of type array|bool, null given
[] => []
-new stdClass => Argument ... must be of type array|bool, object given
-new WithToString => Argument ... must be of type array|bool, object 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
diff --git a/Zend/tests/type_declarations/weak_include_strict.phpt b/Zend/tests/type_declarations/weak_include_strict.phpt
index 52f5f55cdb..61f33818e2 100644
--- a/Zend/tests/type_declarations/weak_include_strict.phpt
+++ b/Zend/tests/type_declarations/weak_include_strict.phpt
@@ -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: Argument 1 passed to takes_int() must be of the type int, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
+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
Stack trace:
#0 %s(%d): takes_int(1)
#1 %s(%d): require('%s')
diff --git a/Zend/tests/typehints/or_null.phpt b/Zend/tests/typehints/or_null.phpt
index 552db7d058..55714620c2 100644
--- a/Zend/tests/typehints/or_null.phpt
+++ b/Zend/tests/typehints/or_null.phpt
@@ -219,99 +219,99 @@ try {
?>
--EXPECTF--
-TypeError: Argument 1 passed to unloadedClass() must be an instance of I\Dont\Exist or null, instance of stdClass given, called in %s on line 8 and defined in %s:5
+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
Stack trace:
#0 %s(8): unloadedClass(Object(stdClass))
#1 {main}
-TypeError: Argument 1 passed to loadedClass() must be an instance of RealClass or null, instance of stdClass given, called in %s on line 20 and defined in %s:16
+TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(20): loadedClass(Object(stdClass))
#1 {main}
-TypeError: Argument 1 passed to loadedInterface() must implement interface RealInterface or be null, instance of stdClass given, called in %s on line 26 and defined in %s:17
+TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, stdClass given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(26): loadedInterface(Object(stdClass))
#1 {main}
-TypeError: Argument 1 passed to unloadedClass() must be an instance of I\Dont\Exist or null, int given, called in %s on line 32 and defined in %s:5
+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
Stack trace:
#0 %s(32): unloadedClass(1)
#1 {main}
-TypeError: Argument 1 passed to loadedClass() must be an instance of RealClass or null, int given, called in %s on line 38 and defined in %s:16
+TypeError: loadedClass() expects argument #1 ($param) to be of type ?RealClass, int given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(38): loadedClass(1)
#1 {main}
-TypeError: Argument 1 passed to loadedInterface() must implement interface RealInterface or be null, int given, called in %s on line 44 and defined in %s:17
+TypeError: loadedInterface() expects argument #1 ($param) to be of type ?RealInterface, int given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(44): loadedInterface(1)
#1 {main}
-TypeError: Argument 1 passed to callableF() must be callable or null, int given, called in %s on line 52 and defined in %s:49
+TypeError: callableF() expects argument #1 ($param) to be of type ?callable, int given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(52): callableF(1)
#1 {main}
-TypeError: Argument 1 passed to iterableF() must be iterable or null, int given, called in %s on line 60 and defined in %s:57
+TypeError: iterableF() expects argument #1 ($param) to be of type ?iterable, int given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(60): iterableF(1)
#1 {main}
-TypeError: Argument 1 passed to intF() must be of the type int or null, object given, called in %s on line 68 and defined in %s:65
+TypeError: intF() expects argument #1 ($param) to be of type ?int, object given, called in %s on line %d and defined in %s:%d
Stack trace:
#0 %s(68): intF(Object(stdClass))
#1 {main}
-TypeError: Return value of returnUnloadedClass() must be an instance of I\Dont\Exist or null, instance of stdClass returned in %s:74
+TypeError: Return value of returnUnloadedClass() must be of type ?I\Dont\Exist, stdClass returned in %s:74
Stack trace:
#0 %s(78): returnUnloadedClass()
#1 {main}
-TypeError: Return value of returnLoadedClass() must be an instance of RealClass or null, instance of stdClass returned in %s:84
+TypeError: Return value of returnLoadedClass() must be of type ?RealClass, stdClass returned in %s:84
Stack trace:
#0 %s(88): returnLoadedClass()
#1 {main}
-TypeError: Return value of returnLoadedInterface() must implement interface RealInterface or be null, instance of stdClass returned in %s:94
+TypeError: Return value of returnLoadedInterface() must be of type ?RealInterface, stdClass returned in %s:94
Stack trace:
#0 %s(98): returnLoadedInterface()
#1 {main}
-TypeError: Return value of returnUnloadedClassScalar() must be an instance of I\Dont\Exist or null, int returned in %s:104
+TypeError: Return value of returnUnloadedClassScalar() must be of type ?I\Dont\Exist, int returned in %s:104
Stack trace:
#0 %s(108): returnUnloadedClassScalar()
#1 {main}
-TypeError: Return value of returnLoadedClassScalar() must be an instance of RealClass or null, int returned in %s:114
+TypeError: Return value of returnLoadedClassScalar() must be of type ?RealClass, int returned in %s:114
Stack trace:
#0 %s(118): returnLoadedClassScalar()
#1 {main}
-TypeError: Return value of returnLoadedInterfaceScalar() must implement interface RealInterface or be null, int returned in %s:124
+TypeError: Return value of returnLoadedInterfaceScalar() must be of type ?RealInterface, int returned in %s:124
Stack trace:
#0 %s(128): returnLoadedInterfaceScalar()
#1 {main}
-TypeError: Return value of returnCallable() must be callable or null, int returned in %s:134
+TypeError: Return value of returnCallable() must be of type ?callable, int returned in %s:134
Stack trace:
#0 %s(138): returnCallable()
#1 {main}
-TypeError: Return value of returnIterable() must be iterable or null, int returned in %s:144
+TypeError: Return value of returnIterable() must be of type ?iterable, int returned in %s:144
Stack trace:
#0 %s(148): returnIterable()
#1 {main}
-TypeError: Return value of returnInt() must be of the type int or null, object returned in %s:154
+TypeError: Return value of returnInt() must be of type ?int, object returned in %s:154
Stack trace:
#0 %s(158): returnInt()
#1 {main}
-TypeError: Return value of returnMissingUnloadedClass() must be an instance of I\Dont\Exist or null, none returned in %s:164
+TypeError: Return value of returnMissingUnloadedClass() must be of type ?I\Dont\Exist, none returned in %s:164
Stack trace:
#0 %s(167): returnMissingUnloadedClass()
#1 {main}
-TypeError: Return value of returnMissingLoadedClass() must be an instance of RealClass or null, none returned in %s:173
+TypeError: Return value of returnMissingLoadedClass() must be of type ?RealClass, none returned in %s:173
Stack trace:
#0 %s(176): returnMissingLoadedClass()
#1 {main}
-TypeError: Return value of returnMissingLoadedInterface() must implement interface RealInterface or be null, none returned in %s:182
+TypeError: Return value of returnMissingLoadedInterface() must be of type ?RealInterface, none returned in %s:182
Stack trace:
#0 %s(185): returnMissingLoadedInterface()
#1 {main}
-TypeError: Return value of returnMissingCallable() must be callable or null, none returned in %s:191
+TypeError: Return value of returnMissingCallable() must be of type ?callable, none returned in %s:191
Stack trace:
#0 %s(194): returnMissingCallable()
#1 {main}
-TypeError: Return value of returnMissingIterable() must be iterable or null, none returned in %s:200
+TypeError: Return value of returnMissingIterable() must be of type ?iterable, none returned in %s:200
Stack trace:
#0 %s(203): returnMissingIterable()
#1 {main}
-TypeError: Return value of returnMissingInt() must be of the type int or null, none returned in %s:209
+TypeError: Return value of returnMissingInt() must be of type ?int, none returned in %s:209
Stack trace:
#0 %s(212): returnMissingInt()
#1 {main}
diff --git a/Zend/tests/variadic/typehint_error.phpt b/Zend/tests/variadic/typehint_error.phpt
index d9a5ea291f..712e21d3ac 100644
--- a/Zend/tests/variadic/typehint_error.phpt
+++ b/Zend/tests/variadic/typehint_error.phpt
@@ -33,7 +33,7 @@ array(3) {
}
}
-Fatal error: Uncaught TypeError: Argument 3 passed to test() must be of the type array, int given, called in %s:%d
+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
Stack trace:
#0 %s(%d): test(Array, Array, 2)
#1 {main}
diff --git a/Zend/tests/variadic/typehint_suppressed_error.phpt b/Zend/tests/variadic/typehint_suppressed_error.phpt
index e7906ea2f2..d1168f4025 100644
--- a/Zend/tests/variadic/typehint_suppressed_error.phpt
+++ b/Zend/tests/variadic/typehint_suppressed_error.phpt
@@ -15,4 +15,4 @@ try {
?>
--EXPECTF--
-string(%d) "Argument 3 passed to test() must be of the type array, int given, called in %s on line %d"
+string(%d) "test() expects argument #3 ($args) to be of type array, int given, called in %s on line %d"