diff --git a/Zend/tests/011.phpt b/Zend/tests/011.phpt index 0a7e3fd90a11e..8412699e026bf 100644 --- a/Zend/tests/011.phpt +++ b/Zend/tests/011.phpt @@ -89,7 +89,7 @@ bool(false) property_exists(): Argument #1 ($object_or_class) must be of type object|string, array given property_exists(): Argument #1 ($object_or_class) must be of type object|string, int given property_exists(): Argument #1 ($object_or_class) must be of type object|string, float given -property_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +property_exists(): Argument #1 ($object_or_class) must be of type object|string, true given property_exists(): Argument #1 ($object_or_class) must be of type object|string, null given bool(true) bool(true) diff --git a/Zend/tests/024.phpt b/Zend/tests/024.phpt index 22d93483fed87..0077113ad1400 100644 --- a/Zend/tests/024.phpt +++ b/Zend/tests/024.phpt @@ -17,14 +17,14 @@ var_dump($a->$b->{$c[1]}); --EXPECTF-- Warning: Undefined variable $a in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined variable $a in %s on line %d Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined variable $a in %s on line %d @@ -49,7 +49,7 @@ NULL Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "1" on int in %s on line %d diff --git a/Zend/tests/033.phpt b/Zend/tests/033.phpt index 22e4b6a12097f..6593d6ba4ad44 100644 --- a/Zend/tests/033.phpt +++ b/Zend/tests/033.phpt @@ -27,39 +27,39 @@ try { --EXPECTF-- Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Undefined variable $arr in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "foo" on null in %s on line %d Attempt to assign property "foo" on null diff --git a/Zend/tests/assign_dim_obj_null_return.phpt b/Zend/tests/assign_dim_obj_null_return.phpt index b046a865137aa..0a2ea94c552d5 100644 --- a/Zend/tests/assign_dim_obj_null_return.phpt +++ b/Zend/tests/assign_dim_obj_null_return.phpt @@ -79,5 +79,5 @@ Cannot add element to the array as the next element is already occupied Illegal offset type Illegal offset type Cannot use a scalar value as an array -Attempt to assign property "foo" on bool -Attempt to assign property "foo" on bool +Attempt to assign property "foo" on true +Attempt to assign property "foo" on true diff --git a/Zend/tests/assign_to_var_003.phpt b/Zend/tests/assign_to_var_003.phpt index 3ecf89e172561..9cbcc66776ab1 100644 --- a/Zend/tests/assign_to_var_003.phpt +++ b/Zend/tests/assign_to_var_003.phpt @@ -13,7 +13,7 @@ var_dump($var1); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type float in %s on line %d +Warning: Trying to access array offset on float in %s on line %d NULL NULL Done diff --git a/Zend/tests/bug44660.phpt b/Zend/tests/bug44660.phpt index 1d81677f127e9..02588c44b9d11 100644 --- a/Zend/tests/bug44660.phpt +++ b/Zend/tests/bug44660.phpt @@ -48,22 +48,22 @@ var_dump($a); ?> --EXPECTF-- --> read access: -Warning: Attempt to read property "p" on bool in %s on line %d +Warning: Attempt to read property "p" on true in %s on line %d --> direct assignment: -Attempt to assign property "p" on bool +Attempt to assign property "p" on true --> increment: -Attempt to increment/decrement property "p" on bool +Attempt to increment/decrement property "p" on true --> reference assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> reference assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> indexed assignment: -Attempt to modify property "p" on bool +Attempt to modify property "p" on true --> Confirm assignments have had no impact: bool(true) diff --git a/Zend/tests/bug81631.phpt b/Zend/tests/bug81631.phpt index 191ea951274d2..4542f1fba13f7 100644 --- a/Zend/tests/bug81631.phpt +++ b/Zend/tests/bug81631.phpt @@ -8,7 +8,7 @@ var_dump($b::class); --EXPECTF-- Warning: Undefined variable $b in %s on line 3 -Fatal error: Uncaught TypeError: Cannot use "::class" on value of type null in %s:3 +Fatal error: Uncaught TypeError: Cannot use "::class" on null in %s:3 Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt index 08083e71a9461..1a36f2f19fbb9 100644 --- a/Zend/tests/call_user_func_007.phpt +++ b/Zend/tests/call_user_func_007.phpt @@ -13,7 +13,7 @@ var_dump($a); --EXPECTF-- Warning: Undefined array key 0 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d array(0) { diff --git a/Zend/tests/class_on_constant_evaluated_expression.phpt b/Zend/tests/class_on_constant_evaluated_expression.phpt index c70262c20d7bb..9129d739c4198 100644 --- a/Zend/tests/class_on_constant_evaluated_expression.phpt +++ b/Zend/tests/class_on_constant_evaluated_expression.phpt @@ -7,4 +7,4 @@ An error should be generated when using ::class on a constant evaluated expressi ?> --EXPECTF-- -Fatal error: Cannot use "::class" on value of type int in %s on line %d +Fatal error: Cannot use "::class" on int in %s on line %d diff --git a/Zend/tests/class_on_object.phpt b/Zend/tests/class_on_object.phpt index c316eff3e467d..dab09872901ba 100644 --- a/Zend/tests/class_on_object.phpt +++ b/Zend/tests/class_on_object.phpt @@ -25,4 +25,4 @@ try { string(8) "stdClass" string(8) "stdClass" string(8) "stdClass" -Cannot use "::class" on value of type null +Cannot use "::class" on null diff --git a/Zend/tests/const_expr_dim_on_null_warning.phpt b/Zend/tests/const_expr_dim_on_null_warning.phpt index 9bea754446ffb..3efa4b9c5243d 100644 --- a/Zend/tests/const_expr_dim_on_null_warning.phpt +++ b/Zend/tests/const_expr_dim_on_null_warning.phpt @@ -6,5 +6,5 @@ const C = (null)['foo']; var_dump(C); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index 6c8339bb1321a..135b7432f12f1 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -70,7 +70,7 @@ array(2) { } int(1) -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Warning: Undefined array key 4 in %s on line %d diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt index 191da8f3488f3..53f27322a2e45 100644 --- a/Zend/tests/dereference_010.phpt +++ b/Zend/tests/dereference_010.phpt @@ -21,10 +21,10 @@ var_dump(b()[1]); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Fatal error: Uncaught Error: Cannot use object of type stdClass as array in %s:%d diff --git a/Zend/tests/dereference_014.phpt b/Zend/tests/dereference_014.phpt index 35affdf3caeed..82b9d91f3d46c 100644 --- a/Zend/tests/dereference_014.phpt +++ b/Zend/tests/dereference_014.phpt @@ -27,12 +27,12 @@ var_dump($h); ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "a" on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "b" on null in %s on line %d NULL diff --git a/Zend/tests/isset_003.phpt b/Zend/tests/isset_003.phpt index 6979a847af74d..9a0d201fa5341 100644 --- a/Zend/tests/isset_003.phpt +++ b/Zend/tests/isset_003.phpt @@ -33,7 +33,7 @@ Warning: Undefined variable $c in %s on line %d Warning: Undefined variable $d in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Warning: Attempt to read property "" on string in %s on line %d bool(false) diff --git a/Zend/tests/nullsafe_operator/002.phpt b/Zend/tests/nullsafe_operator/002.phpt index 46c1bb623f6e5..87642bdcb5f08 100644 --- a/Zend/tests/nullsafe_operator/002.phpt +++ b/Zend/tests/nullsafe_operator/002.phpt @@ -35,7 +35,7 @@ try { ?> --EXPECT-- -string(39) "Call to a member function bar() on bool" +string(40) "Call to a member function bar() on false" string(40) "Call to a member function bar() on array" string(38) "Call to a member function bar() on int" string(40) "Call to a member function bar() on float" diff --git a/Zend/tests/offset_bool.phpt b/Zend/tests/offset_bool.phpt index ae8df6d2b5b40..2cb2ccf47b6eb 100644 --- a/Zend/tests/offset_bool.phpt +++ b/Zend/tests/offset_bool.phpt @@ -25,30 +25,30 @@ var_dump($bool[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on true in %s on line %d NULL Done diff --git a/Zend/tests/offset_long.phpt b/Zend/tests/offset_long.phpt index 17dfe0d29bf74..1d217c32b95f4 100644 --- a/Zend/tests/offset_long.phpt +++ b/Zend/tests/offset_long.phpt @@ -25,30 +25,30 @@ var_dump($long[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL -Warning: Trying to access array offset on value of type int in %s on line %d +Warning: Trying to access array offset on int in %s on line %d NULL Done diff --git a/Zend/tests/offset_null.phpt b/Zend/tests/offset_null.phpt index ae02eece77ca3..bde9407539729 100644 --- a/Zend/tests/offset_null.phpt +++ b/Zend/tests/offset_null.phpt @@ -25,30 +25,30 @@ var_dump($null[$arr]); echo "Done\n"; ?> --EXPECTF-- -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Done diff --git a/Zend/tests/prop_const_expr/basic_nullsafe.phpt b/Zend/tests/prop_const_expr/basic_nullsafe.phpt index da870c0328b0a..6601f362c826b 100644 --- a/Zend/tests/prop_const_expr/basic_nullsafe.phpt +++ b/Zend/tests/prop_const_expr/basic_nullsafe.phpt @@ -39,7 +39,7 @@ Warning: Attempt to read property "test" on null in %s on line %d NULL NULL -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL NULL Printer diff --git a/Zend/tests/type_declarations/scalar_strict.phpt b/Zend/tests/type_declarations/scalar_strict.phpt index 6d838848e902a..51bb8fac1678f 100644 --- a/Zend/tests/type_declarations/scalar_strict.phpt +++ b/Zend/tests/type_declarations/scalar_strict.phpt @@ -84,10 +84,10 @@ int(2147483647) *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -137,10 +137,10 @@ float(2147483647) float(NAN) *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -190,10 +190,10 @@ string(0) "" *** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_strict_64bit.phpt b/Zend/tests/type_declarations/scalar_strict_64bit.phpt index 4705fa81dbd70..5d4dd0edeb682 100644 --- a/Zend/tests/type_declarations/scalar_strict_64bit.phpt +++ b/Zend/tests/type_declarations/scalar_strict_64bit.phpt @@ -84,10 +84,10 @@ int(9223372036854775807) *** Caught {closure}(): Argument #1 ($i) must be of type int, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -137,10 +137,10 @@ float(9.223372036854776E+18) float(NAN) *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -190,10 +190,10 @@ string(0) "" *** Caught {closure}(): Argument #1 ($s) must be of type string, float given, called in %s on line %d *** Trying bool(true) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying bool(false) -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying NULL *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/scalar_strict_basic.phpt b/Zend/tests/type_declarations/scalar_strict_basic.phpt index f02649b8b55fc..296e8f7ad63a8 100644 --- a/Zend/tests/type_declarations/scalar_strict_basic.phpt +++ b/Zend/tests/type_declarations/scalar_strict_basic.phpt @@ -63,10 +63,10 @@ int(1) *** Caught {closure}(): Argument #1 ($i) must be of type int, string given, called in %s on line %d *** Trying true value -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($i) must be of type int, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($i) must be of type int, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($i) must be of type int, null given, called in %s on line %d @@ -92,10 +92,10 @@ float(1) *** Caught {closure}(): Argument #1 ($f) must be of type float, string given, called in %s on line %d *** Trying true value -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($f) must be of type float, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($f) must be of type float, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($f) must be of type float, null given, called in %s on line %d @@ -121,10 +121,10 @@ Testing 'string' type: string(1) "1" *** Trying true value -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, true given, called in %s on line %d *** Trying false value -*** Caught {closure}(): Argument #1 ($s) must be of type string, bool given, called in %s on line %d +*** Caught {closure}(): Argument #1 ($s) must be of type string, false given, called in %s on line %d *** Trying null value *** Caught {closure}(): Argument #1 ($s) must be of type string, null given, called in %s on line %d diff --git a/Zend/tests/type_declarations/typed_properties_111.phpt b/Zend/tests/type_declarations/typed_properties_111.phpt index c23fb72e5d657..20236e8a19bb3 100644 --- a/Zend/tests/type_declarations/typed_properties_111.phpt +++ b/Zend/tests/type_declarations/typed_properties_111.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECT-- -Cannot assign bool to property Foo::$value of type false +Cannot assign true to property Foo::$value of type false diff --git a/Zend/tests/type_declarations/typed_properties_112.phpt b/Zend/tests/type_declarations/typed_properties_112.phpt index 5d54aa3234fe6..8b1157759fec3 100644 --- a/Zend/tests/type_declarations/typed_properties_112.phpt +++ b/Zend/tests/type_declarations/typed_properties_112.phpt @@ -16,4 +16,4 @@ try { ?> --EXPECT-- -Cannot assign bool to property Foo::$value of type true +Cannot assign false to property Foo::$value of type true 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 7054a7cc19127..31460f5d5719c 100644 --- a/Zend/tests/type_declarations/union_types/type_checking_strict.phpt +++ b/Zend/tests/type_declarations/union_types/type_checking_strict.phpt @@ -71,8 +71,8 @@ INF => INF "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 +true => Argument ... must be of type int|float, true given +false => Argument ... must be of type int|float, false 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, stdClass given @@ -87,7 +87,7 @@ INF => INF "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 +true => Argument ... must be of type int|float|false, true given false => false null => Argument ... must be of type int|float|false, null given [] => Argument ... must be of type int|float|false, array given @@ -135,8 +135,8 @@ INF => Argument ... must be of type string|int|null, float given "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 ... must be of type string|int|null, true given +false => Argument ... must be of type string|int|null, false given null => null [] => Argument ... must be of type string|int|null, array given new stdClass => Argument ... must be of type string|int|null, stdClass given @@ -167,8 +167,8 @@ INF => INF "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 +true => Argument ... must be of type array|float, true given +false => Argument ... must be of type array|float, false given null => Argument ... must be of type array|float, null given [] => [] new stdClass => Argument ... must be of type array|float, stdClass given @@ -183,8 +183,8 @@ INF => Argument ... must be of type array|string, float given "42x" => "42x" "x" => "x" "" => "" -true => Argument ... must be of type array|string, bool given -false => Argument ... must be of type array|string, bool given +true => Argument ... must be of type array|string, true given +false => Argument ... must be of type array|string, false given null => Argument ... must be of type array|string, null given [] => [] new stdClass => Argument ... must be of type array|string, stdClass given diff --git a/Zend/zend_API.c b/Zend/zend_API.c index e1e113d0ef39c..21e768f0947c3 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -101,7 +101,7 @@ ZEND_API ZEND_COLD void zend_wrong_property_read(zval *object, zval *property) { zend_string *tmp_property_name; zend_string *property_name = zval_get_tmp_string(property, &tmp_property_name); - zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_type_name(object)); + zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_value_name(object)); zend_tmp_string_release(tmp_property_name); } @@ -142,7 +142,26 @@ ZEND_API const char *zend_get_type_by_const(int type) /* {{{ */ } /* }}} */ -ZEND_API const char *zend_zval_type_name(const zval *arg) /* {{{ */ +ZEND_API const char *zend_zval_value_name(const zval *arg) +{ + ZVAL_DEREF(arg); + + if (Z_ISUNDEF_P(arg)) { + return "null"; + } + + if (Z_TYPE_P(arg) == IS_OBJECT) { + return ZSTR_VAL(Z_OBJCE_P(arg)->name); + } else if (Z_TYPE_P(arg) == IS_FALSE) { + return "false"; + } else if (Z_TYPE_P(arg) == IS_TRUE) { + return "true"; + } + + return zend_get_type_by_const(Z_TYPE_P(arg)); +} + +ZEND_API const char *zend_zval_type_name(const zval *arg) { ZVAL_DEREF(arg); @@ -156,7 +175,6 @@ ZEND_API const char *zend_zval_type_name(const zval *arg) /* {{{ */ return zend_get_type_by_const(Z_TYPE_P(arg)); } -/* }}} */ /* This API exists *only* for use in gettype(). * For anything else, you likely want zend_zval_type_name(). */ @@ -277,7 +295,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(uint32_t n return; } - zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be %s, %s given", expected_error[expected_type], zend_zval_value_name(arg)); } /* }}} */ @@ -287,7 +305,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t return; } - zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -297,7 +315,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(u return; } - zend_argument_type_error(num, "must be of type ?%s, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type ?%s, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -307,7 +325,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_error(u return; } - zend_argument_type_error(num, "must be of type %s|int, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|int, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -317,7 +335,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_long_or_null return; } - zend_argument_type_error(num, "must be of type %s|int|null, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|int|null, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -327,7 +345,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_error return; } - zend_argument_type_error(num, "must be of type %s|string, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|string, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -337,7 +355,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_string_or_nu return; } - zend_argument_type_error(num, "must be of type %s|string|null, %s given", name, zend_zval_type_name(arg)); + zend_argument_type_error(num, "must be of type %s|string|null, %s given", name, zend_zval_value_name(arg)); } /* }}} */ @@ -884,7 +902,7 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec if (!zend_parse_arg_object(arg, p, ce, check_null)) { if (ce) { if (check_null) { - zend_spprintf(error, 0, "must be of type ?%s, %s given", ZSTR_VAL(ce->name), zend_zval_type_name(arg)); + zend_spprintf(error, 0, "must be of type ?%s, %s given", ZSTR_VAL(ce->name), zend_zval_value_name(arg)); return ""; } else { return ZSTR_VAL(ce->name); @@ -1004,7 +1022,7 @@ static zend_result zend_parse_arg(uint32_t arg_num, zval *arg, va_list *va, cons } efree(error); } else { - zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_type_name(arg)); + zend_argument_type_error(arg_num, "must be of type %s, %s given", expected_type, zend_zval_value_name(arg)); } } else if (error) { efree(error); diff --git a/Zend/zend_API.h b/Zend/zend_API.h index cbc455eaab0b5..f8197060acf76 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -355,6 +355,7 @@ ZEND_API zend_result zend_parse_parameters_ex(int flags, uint32_t num_args, cons #define zend_parse_parameters_throw(num_args, ...) \ zend_parse_parameters(num_args, __VA_ARGS__) ZEND_API const char *zend_zval_type_name(const zval *arg); +ZEND_API const char *zend_zval_value_name(const zval *arg); ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg); ZEND_API zend_result zend_parse_method_parameters(uint32_t num_args, zval *this_ptr, const char *type_spec, ...); diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index b34092be038a2..2dbcb47392e9a 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -50,7 +50,7 @@ void validate_attribute(zend_attribute *attr, uint32_t target, zend_class_entry if (Z_TYPE(flags) != IS_LONG) { zend_error_noreturn(E_ERROR, "Attribute::__construct(): Argument #1 ($flags) must be of type int, %s given", - zend_zval_type_name(&flags) + zend_zval_value_name(&flags) ); } diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 14ee4512d369e..66f196e5c82b9 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -880,7 +880,7 @@ ZEND_FUNCTION(method_exists) RETURN_FALSE; } } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(klass)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(klass)); RETURN_THROWS(); } @@ -942,7 +942,7 @@ ZEND_FUNCTION(property_exists) } else if (Z_TYPE_P(object) == IS_OBJECT) { ce = Z_OBJCE_P(object); } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(object)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(object)); RETURN_THROWS(); } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4cb9b9c85305b..d0a09db6978e6 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -7614,7 +7614,7 @@ static void zend_compile_prop_decl(zend_ast *ast, zend_ast *type_ast, uint32_t f } else { zend_error_noreturn(E_COMPILE_ERROR, "Cannot use %s as default value for property %s::$%s of type %s", - zend_zval_type_name(&value_zv), + zend_zval_value_name(&value_zv), ZSTR_VAL(ce->name), ZSTR_VAL(name), ZSTR_VAL(str)); } } @@ -9711,8 +9711,8 @@ static void zend_compile_class_name(znode *result, zend_ast *ast) /* {{{ */ if (expr_node.op_type == IS_CONST) { /* Unlikely case that happen if class_ast is constant folded. * Handle it here, to avoid needing a CONST specialization in the VM. */ - zend_error_noreturn(E_COMPILE_ERROR, "Cannot use \"::class\" on value of type %s", - zend_zval_type_name(&expr_node.u.constant)); + zend_error_noreturn(E_COMPILE_ERROR, "Cannot use \"::class\" on %s", + zend_zval_value_name(&expr_node.u.constant)); } zend_emit_op_tmp(result, ZEND_FETCH_CLASS_NAME, &expr_node, NULL); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index e6fc2a191c0d4..7940ad25aa96f 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -635,7 +635,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_POST_DEC_OBJ) { zend_throw_error(NULL, "Attempt to increment/decrement property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } else if (opline->opcode == ZEND_FETCH_OBJ_W || opline->opcode == ZEND_FETCH_OBJ_RW @@ -643,12 +643,12 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_ASSIGN_OBJ_REF) { zend_throw_error(NULL, "Attempt to modify property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } else { zend_throw_error(NULL, "Attempt to assign property \"%s\" on %s", - ZSTR_VAL(property_name), zend_zval_type_name(object) + ZSTR_VAL(property_name), zend_zval_value_name(object) ); } zend_tmp_string_release(tmp_property_name); @@ -675,7 +675,7 @@ static ZEND_COLD void zend_verify_type_error_common( *need_msg = zend_type_to_string_resolved(arg_info->type, zf->common.scope); if (value) { - *given_kind = zend_zval_type_name(value); + *given_kind = zend_zval_value_name(value); } else { *given_kind = "none"; } @@ -824,7 +824,7 @@ ZEND_COLD zend_never_inline void zend_verify_property_type_error(const zend_prop type_str = zend_type_to_string(info->type); zend_type_error("Cannot assign %s to property %s::$%s of type %s", - zend_zval_type_name(property), + zend_zval_value_name(property), ZSTR_VAL(info->ce->name), zend_get_unmangled_property_name(info->name), ZSTR_VAL(type_str)); @@ -1414,7 +1414,7 @@ ZEND_API bool zend_verify_internal_return_type(zend_function *zf, zval *ret) if (ZEND_TYPE_FULL_MASK(ret_info->type) & MAY_BE_VOID) { if (UNEXPECTED(Z_TYPE_P(ret) != IS_NULL)) { - zend_verify_void_return_error(zf, zend_zval_type_name(ret), ""); + zend_verify_void_return_error(zf, zend_zval_value_name(ret), ""); return 0; } return 1; @@ -2181,7 +2181,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_method(cons static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_invalid_method_call(zval *object, zval *function_name) { zend_throw_error(NULL, "Call to a member function %s() on %s", - Z_STRVAL_P(function_name), zend_zval_type_name(object)); + Z_STRVAL_P(function_name), zend_zval_value_name(object)); } static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_non_static_method_call(const zend_function *fbc) @@ -2786,8 +2786,8 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z ZVAL_UNDEFINED_OP2(); } if (!is_list && type != BP_VAR_IS) { - zend_error(E_WARNING, "Trying to access array offset on value of type %s", - zend_zval_type_name(container)); + zend_error(E_WARNING, "Trying to access array offset on %s", + zend_zval_value_name(container)); } ZVAL_NULL(result); } @@ -2986,7 +2986,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_array_key_exists_error( } if (!EG(exception)) { zend_type_error("array_key_exists(): Argument #2 ($array) must be of type array, %s given", - zend_zval_type_name(subject)); + zend_zval_value_name(subject)); } } @@ -3406,7 +3406,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv) { zend_string *type_str = zend_type_to_string(prop->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s", - zend_zval_type_name(zv), + zend_zval_value_name(zv), ZSTR_VAL(prop->ce->name), zend_get_unmangled_property_name(prop->name), ZSTR_VAL(type_str) @@ -3418,7 +3418,7 @@ ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_propert zend_string *type1_str = zend_type_to_string(prop1->type); zend_string *type2_str = zend_type_to_string(prop2->type); zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s and property %s::$%s of type %s, as this would result in an inconsistent type conversion", - zend_zval_type_name(zv), + zend_zval_value_name(zv), ZSTR_VAL(prop1->ce->name), zend_get_unmangled_property_name(prop1->name), ZSTR_VAL(type1_str), diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index cc529444b33cc..9f6ae2073f7a8 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -1560,7 +1560,7 @@ ZEND_API zend_result ZEND_FASTCALL bitwise_not_function(zval *result, zval *op1) if (result != op1) { ZVAL_UNDEF(result); } - zend_type_error("Cannot perform bitwise not on %s", zend_zval_type_name(op1)); + zend_type_error("Cannot perform bitwise not on %s", zend_zval_value_name(op1)); return FAILURE; } } @@ -2541,7 +2541,7 @@ ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ ZEND_FALLTHROUGH; case IS_RESOURCE: case IS_ARRAY: - zend_type_error("Cannot increment %s", zend_zval_type_name(op1)); + zend_type_error("Cannot increment %s", zend_zval_value_name(op1)); return FAILURE; EMPTY_SWITCH_DEFAULT_CASE() } @@ -2603,7 +2603,7 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ ZEND_FALLTHROUGH; case IS_RESOURCE: case IS_ARRAY: - zend_type_error("Cannot decrement %s", zend_zval_type_name(op1)); + zend_type_error("Cannot decrement %s", zend_zval_value_name(op1)); return FAILURE; EMPTY_SWITCH_DEFAULT_CASE() } diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 003fc95bf7736..a94f8cc762a80 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5264,7 +5264,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM) ZEND_VM_C_GOTO(send_array); } } - zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_value_name(args)); FREE_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -5290,7 +5290,7 @@ ZEND_VM_C_LABEL(send_array): || !zend_parse_arg_long_weak(op2, &len, /* arg_num */ 3)) { zend_type_error( "array_slice(): Argument #3 ($length) must be of type ?int, %s given", - zend_zval_type_name(op2)); + zend_zval_value_name(op2)); FREE_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); @@ -6679,7 +6679,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET_R, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; FREE_OP1(); @@ -6769,7 +6769,7 @@ ZEND_VM_COLD_CONST_HANDLER(125, ZEND_FE_RESET_RW, CONST|TMP|VAR|CV, JMP_ADDR) } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; FREE_OP1(); @@ -7143,7 +7143,7 @@ ZEND_VM_HANDLER(126, ZEND_FE_FETCH_RW, VAR, ANY, JMP_ADDR) value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array)); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); @@ -8534,7 +8534,7 @@ ZEND_VM_COLD_CONST_HANDLER(121, ZEND_STRLEN, CONST|TMPVAR|CV, ANY) zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -8629,7 +8629,7 @@ ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, CV|TMPVAR|UNUSED|CLASS_FETCH, ANY) if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP1(); HANDLE_EXCEPTION(); @@ -9212,7 +9212,7 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED) ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -9250,7 +9250,7 @@ ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) if (OP1_TYPE == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index b0f7d2f66bdef..9813c62fdaa52 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -2421,7 +2421,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O goto send_array; } } - zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); + zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_value_name(args)); FREE_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -2447,7 +2447,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O || !zend_parse_arg_long_weak(op2, &len, /* arg_num */ 3)) { zend_type_error( "array_slice(): Argument #3 ($length) must be of type ?int, %s given", - zend_zval_type_name(op2)); + zend_zval_value_name(op2)); FREE_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); @@ -5162,7 +5162,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CONST_HANDLER( } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -5251,7 +5251,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_ } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -5620,7 +5620,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CONST zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -10728,7 +10728,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_ ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -10766,7 +10766,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CO if (IS_CONST == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -14793,7 +14793,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_TMPVAR_HANDLER(ZEN zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -14850,7 +14850,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_TMPVAR_H if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); HANDLE_EXCEPTION(); @@ -17968,7 +17968,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -18006,7 +18006,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_H if ((IS_TMP_VAR|IS_VAR) == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -19276,7 +19276,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_TMP_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -19365,7 +19365,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -21932,7 +21932,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_VAR_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -22022,7 +22022,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_VAR_HANDLER(Z } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); @@ -22278,7 +22278,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_FETCH_RW_SPEC_VAR_HANDLER(Z value_type = Z_TYPE_INFO_P(value); } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array)); if (UNEXPECTED(EG(exception))) { UNDEF_RESULT(); HANDLE_EXCEPTION(); @@ -31954,7 +31954,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_UNUSED_H if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -36225,7 +36225,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_UNUSED_UNUSED_H if (IS_UNUSED == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; @@ -39078,7 +39078,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_R_SPEC_CV_HANDLER(ZEN } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -39167,7 +39167,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_CV_HANDLER(ZE } } } else { - zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_type_name(array_ptr)); + zend_error(E_WARNING, "foreach() argument must be of type array|object, %s given", zend_zval_value_name(array_ptr)); ZVAL_UNDEF(EX_VAR(opline->result.var)); Z_FE_ITER_P(EX_VAR(opline->result.var)) = (uint32_t)-1; @@ -39501,7 +39501,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_STRLEN_SPEC_CV_HANDLER(ZEND_OP zval_ptr_dtor(&tmp); } if (!EG(exception)) { - zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_type_name(value)); + zend_type_error("strlen(): Argument #1 ($str) must be of type string, %s given", zend_zval_value_name(value)); } ZVAL_UNDEF(EX_VAR(opline->result.var)); } while (0); @@ -39558,7 +39558,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_CV_HANDL if (UNEXPECTED(Z_TYPE_P(op) != IS_OBJECT)) { ZVAL_DEREF(op); if (Z_TYPE_P(op) != IS_OBJECT) { - zend_type_error("Cannot use \"::class\" on value of type %s", zend_zval_type_name(op)); + zend_type_error("Cannot use \"::class\" on %s", zend_zval_value_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -48791,7 +48791,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z ZVAL_UNDEFINED_OP1(); } count = 0; - zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_type_name(op1)); + zend_type_error("%s(): Argument #1 ($value) must be of type Countable|array, %s given", opline->extended_value ? "sizeof" : "count", zend_zval_value_name(op1)); break; } @@ -48829,7 +48829,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDL if (IS_CV == IS_CV && UNEXPECTED(Z_TYPE_P(op1) == IS_UNDEF)) { ZVAL_UNDEFINED_OP1(); } - zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_type_name(op1)); + zend_type_error("get_class(): Argument #1 ($object) must be of type object, %s given", zend_zval_value_name(op1)); ZVAL_UNDEF(EX_VAR(opline->result.var)); } break; diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 8e55bf92bed76..7f546f95cd0eb 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -404,7 +404,7 @@ PHP_FUNCTION(bzopen) stream = php_stream_bz2open_from_BZFILE(bz, mode, stream); } else { - zend_argument_type_error(1, "must be of type string or file-resource, %s given", zend_zval_type_name(file)); + zend_argument_type_error(1, "must be of type string or file-resource, %s given", zend_zval_value_name(file)); RETURN_THROWS(); } diff --git a/ext/bz2/tests/002.phpt b/ext/bz2/tests/002.phpt index 00254776f7951..f87048f92314e 100644 --- a/ext/bz2/tests/002.phpt +++ b/ext/bz2/tests/002.phpt @@ -91,10 +91,10 @@ resource(%d) of type (stream) resource(%d) of type (stream) Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d -bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given +bzopen(): Argument #1 ($file) must be of type string or file-resource, false given Warning: fopen(bz_open_002.txt): Failed to open stream: `br' is not a valid mode for fopen in %s on line %d -bzopen(): Argument #1 ($file) must be of type string or file-resource, bool given +bzopen(): Argument #1 ($file) must be of type string or file-resource, false given Warning: bzopen(): cannot write to a stream opened in read only mode in %s on line %d bool(false) diff --git a/ext/dom/node.c b/ext/dom/node.c index d55ac99efeff2..bc7108e087e75 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -1591,7 +1591,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ } if (Z_TYPE_P(tmp) != IS_STRING) { /* if mode == 0 then $xpath arg is 3, if mode == 1 then $xpath is 4 */ - zend_argument_type_error(3 + mode, "\"query\" option must be a string, %s given", zend_zval_type_name(tmp)); + zend_argument_type_error(3 + mode, "\"query\" option must be a string, %s given", zend_zval_value_name(tmp)); RETURN_THROWS(); } xquery = Z_STRVAL_P(tmp); diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 3d7e5e44a4b2c..86c930af0e2a5 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -192,7 +192,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod } else { xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_value_name(&nodes[i])); return NULL; } } else if (Z_TYPE(nodes[i]) == IS_STRING) { @@ -208,7 +208,7 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod } else { xmlFree(fragment); - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_value_name(&nodes[i])); return NULL; } diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 749c64dc9c692..81fc5692e4e84 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -1687,7 +1687,7 @@ static ZEND_COLD void zend_ffi_pass_incompatible(zval *arg, zend_ffi_type *type, zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, buf2.start); } } else { - zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found PHP '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, zend_zval_type_name(arg)); + zend_throw_error(zend_ffi_exception_ce, "Passing incompatible argument %d of C function '%s', expecting '%s', found PHP '%s'", n + 1, ZSTR_VAL(EX(func)->internal_function.function_name), buf1.start, zend_zval_value_name(arg)); } } } @@ -1714,7 +1714,7 @@ static ZEND_COLD void zend_ffi_assign_incompatible(zval *arg, zend_ffi_type *typ zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from type '%s'", buf1.start, buf2.start); } } else { - zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from PHP '%s'", buf1.start, zend_zval_type_name(arg)); + zend_throw_error(zend_ffi_exception_ce, "Incompatible types when assigning to type '%s' from PHP '%s'", buf1.start, zend_zval_value_name(arg)); } } } diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index f0be4c934b16b..a6f3e64db6b45 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -314,7 +314,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime break; default: - zend_argument_type_error(1, "must be of type resource|string, %s given", zend_zval_type_name(what)); + zend_argument_type_error(1, "must be of type resource|string, %s given", zend_zval_value_name(what)); RETURN_THROWS(); } diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 75d106bc48a69..fdd0f063f8ce7 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1247,7 +1247,7 @@ PHP_FUNCTION(ftp_set_option) switch (option) { case PHP_FTP_OPT_TIMEOUT_SEC: if (Z_TYPE_P(z_value) != IS_LONG) { - zend_argument_type_error(3, "must be of type int for the FTP_TIMEOUT_SEC option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type int for the FTP_TIMEOUT_SEC option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } if (Z_LVAL_P(z_value) <= 0) { @@ -1259,7 +1259,7 @@ PHP_FUNCTION(ftp_set_option) break; case PHP_FTP_OPT_AUTOSEEK: if (Z_TYPE_P(z_value) != IS_TRUE && Z_TYPE_P(z_value) != IS_FALSE) { - zend_argument_type_error(3, "must be of type bool for the FTP_AUTOSEEK option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type bool for the FTP_AUTOSEEK option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } ftp->autoseek = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; @@ -1267,7 +1267,7 @@ PHP_FUNCTION(ftp_set_option) break; case PHP_FTP_OPT_USEPASVADDRESS: if (Z_TYPE_P(z_value) != IS_TRUE && Z_TYPE_P(z_value) != IS_FALSE) { - zend_argument_type_error(3, "must be of type bool for the FTP_USEPASVADDRESS option, %s given", zend_zval_type_name(z_value)); + zend_argument_type_error(3, "must be of type bool for the FTP_USEPASVADDRESS option, %s given", zend_zval_value_name(z_value)); RETURN_THROWS(); } ftp->usepasvaddress = Z_TYPE_P(z_value) == IS_TRUE ? 1 : 0; diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 47090c04c34af..ceb17d1597a29 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4040,7 +4040,7 @@ static gdIOCtx *create_stream_context_from_zval(zval *to_zval) { return NULL; } } else { - zend_argument_type_error(2, "must be a file name or a stream resource, %s given", zend_zval_type_name(to_zval)); + zend_argument_type_error(2, "must be a file name or a stream resource, %s given", zend_zval_value_name(to_zval)); return NULL; } diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 910fca52dff97..442269f6d8a35 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -624,10 +624,10 @@ static zend_result convert_to_gmp(mpz_t gmpnumber, zval *val, zend_long base, ui if (!zend_parse_arg_long_slow(val, &lval, arg_pos)) { if (arg_pos == 0) { zend_type_error( - "Number must be of type GMP|string|int, %s given", zend_zval_type_name(val)); + "Number must be of type GMP|string|int, %s given", zend_zval_value_name(val)); } else { zend_argument_type_error(arg_pos, - "must be of type GMP|string|int, %s given", zend_zval_type_name(val)); + "must be of type GMP|string|int, %s given", zend_zval_value_name(val)); } return FAILURE; } diff --git a/ext/gmp/tests/gmp_strict_types.phpt b/ext/gmp/tests/gmp_strict_types.phpt index a63f2ef5059db..006f06465c536 100644 --- a/ext/gmp/tests/gmp_strict_types.phpt +++ b/ext/gmp/tests/gmp_strict_types.phpt @@ -51,7 +51,7 @@ object(GMP)#2 (1) { string(1) "1" } gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, float given -gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given -gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, bool given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, false given +gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, true given gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, null given gmp_abs(): Argument #1 ($num) must be of type GMP|string|int, array given diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 27578d27c6965..2db70351461b4 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -1119,12 +1119,12 @@ PHP_FUNCTION(hash_equals) /* We only allow comparing string to prevent unexpected results. */ if (Z_TYPE_P(known_zval) != IS_STRING) { - zend_argument_type_error(1, "must be of type string, %s given", zend_zval_type_name(known_zval)); + zend_argument_type_error(1, "must be of type string, %s given", zend_zval_value_name(known_zval)); RETURN_THROWS(); } if (Z_TYPE_P(user_zval) != IS_STRING) { - zend_argument_type_error(2, "must be of type string, %s given", zend_zval_type_name(user_zval)); + zend_argument_type_error(2, "must be of type string, %s given", zend_zval_value_name(user_zval)); RETURN_THROWS(); } diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 38ebd7b61d93d..bdb535fd9369a 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3007,7 +3007,7 @@ PHP_FUNCTION(imap_mail_compose) if (Z_TYPE_P(data) != IS_ARRAY) { zend_argument_type_error(2, "individual body must be of type array, %s given", - zend_zval_type_name(data)); + zend_zval_value_name(data)); goto done; } if (zend_hash_num_elements(Z_ARRVAL_P(data)) == 0) { diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c5b0a9b9c4b9b..715bde8bd13e3 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1602,7 +1602,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) result->result = ldap_res; } } else { - zend_argument_type_error(1, "must be of type LDAP|array, %s given", zend_zval_type_name(link)); + zend_argument_type_error(1, "must be of type LDAP|array, %s given", zend_zval_value_name(link)); } cleanup: @@ -2568,7 +2568,7 @@ PHP_FUNCTION(ldap_modify_batch) /* does the value type match the key? */ if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_ATTRIB)) { if (Z_TYPE_P(modinfo) != IS_STRING) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_ATTRIB "\" must be of type string, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_ATTRIB "\" must be of type string, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -2579,7 +2579,7 @@ PHP_FUNCTION(ldap_modify_batch) } else if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_MODTYPE)) { if (Z_TYPE_P(modinfo) != IS_LONG) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be of type int, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_MODTYPE "\" must be of type int, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -2611,7 +2611,7 @@ PHP_FUNCTION(ldap_modify_batch) } else if (_ldap_str_equal_to_const(ZSTR_VAL(modkey), ZSTR_LEN(modkey), LDAP_MODIFY_BATCH_VALUES)) { if (Z_TYPE_P(modinfo) != IS_ARRAY) { - zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_VALUES "\" must be of type array, %s given", get_active_function_name(), zend_zval_type_name(modinfo)); + zend_type_error("%s(): Option \"" LDAP_MODIFY_BATCH_VALUES "\" must be of type array, %s given", get_active_function_name(), zend_zval_value_name(modinfo)); RETURN_THROWS(); } @@ -3200,7 +3200,7 @@ PHP_FUNCTION(ldap_set_option) int rc; if (Z_TYPE_P(newval) != IS_ARRAY) { - zend_argument_type_error(3, "must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, %s given", zend_zval_type_name(newval)); + zend_argument_type_error(3, "must be of type array for the LDAP_OPT_CLIENT_CONTROLS option, %s given", zend_zval_value_name(newval)); RETURN_THROWS(); } diff --git a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt index 2025941e0e77b..9526528a1851a 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt @@ -139,13 +139,13 @@ int(12345) --lowercase null-- int(12345) --lowercase true-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, true given --lowercase false-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, false given --uppercase TRUE-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, true given --uppercase FALSE-- -TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given +TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, false given --empty string DQ-- ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index bb8a130c41f65..9cb982357c31f 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -650,7 +650,7 @@ static int mysqlnd_zval_array_to_mysqlnd_array(zval *in_array, MYSQLND ***out_ar i++; if (Z_TYPE_P(elem) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(elem), mysqli_link_class_entry)) { - zend_argument_type_error(i, "must be an instance of mysqli, %s given", zend_zval_type_name(elem)); + zend_argument_type_error(i, "must be an instance of mysqli, %s given", zend_zval_value_name(elem)); return FAILURE; } else { MY_MYSQL *mysql; diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index 89d6e67a21e19..0200222449e85 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -27,7 +27,7 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to a member function fetch_row() on bool in %sbug33491.php:%d +Fatal error: Uncaught Error: Call to a member function fetch_row() on false in %sbug33491.php:%d Stack trace: #0 %s(%d): DB->query_single('SELECT DATE()') #1 {main} diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index b2539f5c3f429..c594ade575bed 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -34,7 +34,7 @@ static ZEND_COLD void zend_jit_illegal_offset(void) static ZEND_COLD void zend_jit_illegal_string_offset(zval *offset) { - zend_type_error("Cannot access offset of type %s on string", zend_zval_type_name(offset)); + zend_type_error("Cannot access offset of type %s on string", zend_zval_value_name(offset)); } static zend_never_inline zend_function* ZEND_FASTCALL _zend_jit_init_func_run_time_cache(zend_op_array *op_array) /* {{{ */ @@ -112,7 +112,7 @@ static ZEND_COLD void ZEND_FASTCALL zend_jit_invalid_method_call(zval *object) object = &EG(uninitialized_zval); } zend_throw_error(NULL, "Call to a member function %s() on %s", - Z_STRVAL_P(function_name), zend_zval_type_name(object)); + Z_STRVAL_P(function_name), zend_zval_value_name(object)); } static ZEND_COLD void ZEND_FASTCALL zend_jit_invalid_method_call_tmp(zval *object) @@ -2343,19 +2343,19 @@ static void ZEND_FASTCALL zend_jit_only_vars_by_reference(zval *arg) static void ZEND_FASTCALL zend_jit_invalid_array_access(zval *container) { - zend_error(E_WARNING, "Trying to access array offset on value of type %s", zend_zval_type_name(container)); + zend_error(E_WARNING, "Trying to access array offset on %s", zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_read(zval *container, const char *property_name) { - zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", property_name, zend_zval_type_name(container)); + zend_error(E_WARNING, "Attempt to read property \"%s\" on %s", property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_write(zval *container, const char *property_name) { zend_throw_error(NULL, "Attempt to modify property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_incdec(zval *container, const char *property_name) @@ -2373,7 +2373,7 @@ static void ZEND_FASTCALL zend_jit_invalid_property_incdec(zval *container, cons } zend_throw_error(NULL, "Attempt to increment/decrement property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); if (opline->op1_type == IS_VAR) { zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); } @@ -2383,7 +2383,7 @@ static void ZEND_FASTCALL zend_jit_invalid_property_assign(zval *container, cons { zend_throw_error(NULL, "Attempt to assign property \"%s\" on %s", - property_name, zend_zval_type_name(container)); + property_name, zend_zval_value_name(container)); } static void ZEND_FASTCALL zend_jit_invalid_property_assign_op(zval *container, const char *property_name) diff --git a/ext/opcache/tests/jit/bw_not_002.phpt b/ext/opcache/tests/jit/bw_not_002.phpt index 034c6bc90cbdf..e58b06b69f947 100644 --- a/ext/opcache/tests/jit/bw_not_002.phpt +++ b/ext/opcache/tests/jit/bw_not_002.phpt @@ -17,7 +17,7 @@ function test() { test(); ?> --EXPECTF-- -Fatal error: Uncaught TypeError: Cannot perform bitwise not on bool in %sbw_not_002.php:5 +Fatal error: Uncaught TypeError: Cannot perform bitwise not on true in %sbw_not_002.php:5 Stack trace: #0 %sbw_not_002.php(8): test() #1 {main} diff --git a/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt b/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt index 3699eba2045f0..b0b2ee2a1ab99 100644 --- a/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt +++ b/ext/opcache/tests/jit/fetch_dim_func_arg_002.phpt @@ -14,5 +14,5 @@ new class(true[""]) { ?> DONE --EXPECTF-- -Warning: Trying to access array offset on value of type bool in %sfetch_dim_func_arg_002.php on line 2 +Warning: Trying to access array offset on true in %sfetch_dim_func_arg_002.php on line 2 DONE diff --git a/ext/opcache/tests/jit/fetch_dim_r_008.phpt b/ext/opcache/tests/jit/fetch_dim_r_008.phpt index c40d54eefb5f8..42731025fd98e 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_008.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_008.phpt @@ -12,5 +12,5 @@ test()[1]; ?> DONE --EXPECTF-- -Warning: Trying to access array offset on value of type null in %sfetch_dim_r_008.php on line 3 +Warning: Trying to access array offset on null in %sfetch_dim_r_008.php on line 3 DONE diff --git a/ext/opcache/tests/opt/assign_op_001.phpt b/ext/opcache/tests/opt/assign_op_001.phpt index 7ac23d71c0d17..943787b0ad095 100644 --- a/ext/opcache/tests/opt/assign_op_001.phpt +++ b/ext/opcache/tests/opt/assign_op_001.phpt @@ -27,4 +27,4 @@ Fatal error: Uncaught TypeError: Unsupported operand types: array + bool in %sas Stack trace: #0 %sassign_op_001.php(10): test() #1 {main} - thrown in %sassign_op_001.php on line 4 \ No newline at end of file + thrown in %sassign_op_001.php on line 4 diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt index 3db214aa4fbd4..f32292677bac5 100644 --- a/ext/openssl/tests/openssl_pkey_new_error.phpt +++ b/ext/openssl/tests/openssl_pkey_new_error.phpt @@ -28,6 +28,6 @@ try { } ?> --EXPECT-- -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given -openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given +openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, false given diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 9e2ac8e0e6994..69a6e7ba99ab8 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -654,7 +654,7 @@ PHP_FUNCTION(pcntl_signal) zend_string *func_name = zend_get_callable_name(handle); PCNTL_G(last_error) = EINVAL; - zend_argument_type_error(2, "must be of type callable|int, %s given", zend_zval_type_name(handle)); + zend_argument_type_error(2, "must be of type callable|int, %s given", zend_zval_value_name(handle)); zend_string_release_ex(func_name, 0); efree(error); RETURN_THROWS(); diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 6a8bea5068b32..290587b5db100 100644 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -521,7 +521,7 @@ PHP_METHOD(PDO, prepare) if (options && (value = zend_hash_index_find(Z_ARRVAL_P(options), PDO_ATTR_STATEMENT_CLASS)) != NULL) { if (Z_TYPE_P(value) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); RETURN_THROWS(); } if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { @@ -545,7 +545,7 @@ PHP_METHOD(PDO, prepare) if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS constructor_args must be of type ?array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); RETURN_THROWS(); } ZVAL_COPY_VALUE(&ctor_args, item); @@ -698,7 +698,7 @@ PDO_API bool pdo_get_long_param(zend_long *lval, zval *value) } ZEND_FALLTHROUGH; default: - zend_type_error("Attribute value must be of type int for selected attribute, %s given", zend_zval_type_name(value)); + zend_type_error("Attribute value must be of type int for selected attribute, %s given", zend_zval_value_name(value)); return false; } } @@ -716,7 +716,7 @@ PDO_API bool pdo_get_bool_param(bool *bval, zval *value) return true; case IS_STRING: /* TODO Should string be allowed? */ default: - zend_type_error("Attribute value must be of type bool for selected attribute, %s given", zend_zval_type_name(value)); + zend_type_error("Attribute value must be of type bool for selected attribute, %s given", zend_zval_value_name(value)); return false; } } @@ -812,7 +812,7 @@ static bool pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) / } if (Z_TYPE_P(value) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS value must be of type array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); return false; } if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 0)) == NULL) { @@ -840,7 +840,7 @@ static bool pdo_dbh_attribute_set(pdo_dbh_t *dbh, zend_long attr, zval *value) / if ((item = zend_hash_index_find(Z_ARRVAL_P(value), 1)) != NULL) { if (Z_TYPE_P(item) != IS_ARRAY) { zend_type_error("PDO::ATTR_STATEMENT_CLASS constructor_args must be of type ?array, %s given", - zend_zval_type_name(value)); + zend_zval_value_name(value)); return false; } ZVAL_COPY(&dbh->def_stmt_ctor_args, item); diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 65f0900075af0..2d0010eb747a8 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1280,7 +1280,7 @@ PHP_METHOD(PDOStatement, fetchAll) /* Figure out correct class */ if (arg2) { if (Z_TYPE_P(arg2) != IS_STRING) { - zend_argument_type_error(2, "must be of type string, %s given", zend_zval_type_name(arg2)); + zend_argument_type_error(2, "must be of type string, %s given", zend_zval_value_name(arg2)); RETURN_THROWS(); } stmt->fetch.cls.ce = zend_fetch_class(Z_STR_P(arg2), ZEND_FETCH_CLASS_AUTO); @@ -1333,7 +1333,7 @@ PHP_METHOD(PDOStatement, fetchAll) if (arg2) { // Reuse convert_to_long(arg2); ? if (Z_TYPE_P(arg2) != IS_LONG) { - zend_argument_type_error(2, "must be of type int, %s given", zend_zval_type_name(arg2)); + zend_argument_type_error(2, "must be of type int, %s given", zend_zval_value_name(arg2)); RETURN_THROWS(); } if (Z_LVAL_P(arg2) < 0) { @@ -1752,7 +1752,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_LONG) { - zend_argument_type_error(arg1_arg_num, "must be of type int, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type int, %s given", zend_zval_value_name(&args[0])); return false; } if (Z_LVAL(args[0]) < 0) { @@ -1794,7 +1794,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_STRING) { - zend_argument_type_error(arg1_arg_num, "must be of type string, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type string, %s given", zend_zval_value_name(&args[0])); return false; } cep = zend_lookup_class(Z_STR(args[0])); @@ -1807,7 +1807,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a if (variadic_num_args == 2) { if (Z_TYPE(args[1]) != IS_NULL && Z_TYPE(args[1]) != IS_ARRAY) { zend_argument_type_error(constructor_arg_num, "must be of type ?array, %s given", - zend_zval_type_name(&args[1])); + zend_zval_value_name(&args[1])); return false; } if (Z_TYPE(args[1]) == IS_ARRAY && zend_hash_num_elements(Z_ARRVAL(args[1]))) { @@ -1834,7 +1834,7 @@ bool pdo_stmt_setup_fetch_mode(pdo_stmt_t *stmt, zend_long mode, uint32_t mode_a return false; } if (Z_TYPE(args[0]) != IS_OBJECT) { - zend_argument_type_error(arg1_arg_num, "must be of type object, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(arg1_arg_num, "must be of type object, %s given", zend_zval_value_name(&args[0])); return false; } diff --git a/ext/pdo_mysql/tests/bug44327.phpt b/ext/pdo_mysql/tests/bug44327.phpt index 1b99d47937949..40be22e592ffa 100644 --- a/ext/pdo_mysql/tests/bug44327.phpt +++ b/ext/pdo_mysql/tests/bug44327.phpt @@ -62,5 +62,5 @@ object(PDORow)#5 (2) { string(19) "SELECT id FROM test" ---------------------------------- -Warning: Attempt to read property "queryString" on bool in %s on line %d +Warning: Attempt to read property "queryString" on false in %s on line %d NULL diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 7318caa185893..8dfafbb37f977 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -95,7 +95,7 @@ array(1) { Warning: PDO::prepare(): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'unknown_column' in 'field list' in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index f5ec8a9307d35..d1e4cc8d30134 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -37,7 +37,7 @@ Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number: mixed named Warning: PDO::prepare(): SQLSTATE[HY093]: Invalid parameter number in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index 6d00353a7d8b6..c3c4c68a70dd7 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -57,7 +57,7 @@ Testing native PS... Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table '%s.ihopeitdoesnotexist' doesn't exist in %s on line %d -Fatal error: Uncaught Error: Call to a member function execute() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function execute() on false in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index 010ef31f463b4..b2cbe43561b04 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -100,7 +100,7 @@ Native Prepared Statements... Warning: PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near '%SSELECT label FROM test ORDER BY id ASC LIMIT 1' at line %d in %s on line %d -Fatal error: Uncaught Error: Call to a member function errorInfo() on bool in %s:%d +Fatal error: Uncaught Error: Call to a member function errorInfo() on false in %s:%d Stack trace: #0 %s(%d): mysql_stmt_multiquery_wrong_usage(Object(PDO)) #1 {main} diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 00bdf15286e00..1aebb3d4884f1 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2228,7 +2228,7 @@ PHP_FUNCTION(pg_lo_create) wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); RETURN_THROWS(); } if ((pgsql_oid = lo_create(pgsql, wanted_oid)) == InvalidOid) { @@ -2599,7 +2599,7 @@ PHP_FUNCTION(pg_lo_import) wanted_oid = (Oid)Z_LVAL_P(oid); break; default: - zend_type_error("OID value must be of type string|int, %s given", zend_zval_type_name(oid)); + zend_type_error("OID value must be of type string|int, %s given", zend_zval_value_name(oid)); RETURN_THROWS(); } @@ -4489,7 +4489,7 @@ PHP_PGSQL_API zend_result php_pgsql_convert(PGconn *pg_link, const zend_string * err = 1; } if (!err && (Z_TYPE_P(val) == IS_ARRAY || Z_TYPE_P(val) == IS_OBJECT || Z_TYPE_P(val) == IS_RESOURCE)) { - zend_type_error("Values must be of type string|int|float|bool|null, %s given", zend_zval_type_name(val)); + zend_type_error("Values must be of type string|int|float|bool|null, %s given", zend_zval_value_name(val)); err = 1; } if (err) { @@ -5253,7 +5253,7 @@ PHP_PGSQL_API zend_result php_pgsql_insert(PGconn *pg_link, const zend_string *t smart_str_appendl(&querystr, "NULL", sizeof("NULL")-1); break; default: - zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_value_name(val)); goto cleanup; } smart_str_appendc(&querystr, ','); @@ -5427,7 +5427,7 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, smart_str_appendl(querystr, "NULL", sizeof("NULL")-1); break; default: - zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_type_name(val)); + zend_type_error("Value must be of type string|int|float|null, %s given", zend_zval_value_name(val)); return -1; } smart_str_appendl(querystr, pad, pad_len); diff --git a/ext/pgsql/tests/28large_object_import_oid.phpt b/ext/pgsql/tests/28large_object_import_oid.phpt index 3af7529333989..13a0918d84879 100644 --- a/ext/pgsql/tests/28large_object_import_oid.phpt +++ b/ext/pgsql/tests/28large_object_import_oid.phpt @@ -104,7 +104,7 @@ Invalid OID value passed Invalid OID value passed Deprecated: pg_lo_import(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d -OID value must be of type string|int, bool given +OID value must be of type string|int, true given OID value must be of type string|int, array given OID value must be of type string|int, stdClass given OID value must be of type string|int, PgSql\Connection given diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 295a60a32cd12..9eaef153b0885 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -460,7 +460,7 @@ PHP_FUNCTION(posix_ttyname) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); } /* fd must fit in an int and be positive */ @@ -510,7 +510,7 @@ PHP_FUNCTION(posix_isatty) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); fd = zval_get_long(z_fd); } } @@ -1243,7 +1243,7 @@ PHP_FUNCTION(posix_fpathconf) } else { if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) { zend_argument_type_error(1, "must be of type int|resource, %s given", - zend_zval_type_name(z_fd)); + zend_zval_value_name(z_fd)); RETURN_THROWS(); } } diff --git a/ext/pspell/tests/003.phpt b/ext/pspell/tests/003.phpt index 02d66f6309f16..2629a64ea056c 100644 --- a/ext/pspell/tests/003.phpt +++ b/ext/pspell/tests/003.phpt @@ -35,7 +35,7 @@ var_dump(pspell_config_ignore($cfg, PHP_INT_MAX)); bool(false) Warning: pspell_new_config(): PSPELL couldn't open the dictionary. reason: The encoding "b0rked" is not known. This could also mean that the file "%sb0rked.%s" could not be opened for reading or does not exist. in %s003.php on line 9 -pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, bool given +pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, false given --- bool(true) bool(true) diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 186a240b4a01e..85c2aa7e07cad 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2493,7 +2493,7 @@ ZEND_METHOD(ReflectionParameter, __construct) break; default: - zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_type_name(reference)); + zend_argument_error(reflection_exception_ptr, 1, "must be a string, an array(class, method), or a callable object, %s given", zend_zval_value_name(reference)); RETURN_THROWS(); } diff --git a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt index 869682ccdd451..791bfe3f43587 100644 --- a/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_invokeArgs_error2.phpt @@ -24,4 +24,4 @@ try { ?> --EXPECT-- -string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, bool given" +string(85) "ReflectionMethod::invokeArgs(): Argument #2 ($args) must be of type array, true given" diff --git a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt index 92bd0543388b0..67b37411b4216 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_basic.phpt @@ -103,7 +103,7 @@ NULL Static method: ReflectionMethod::invoke() expects at least 1 argument, 0 given -ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, bool given +ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, true given Called staticMethod() Exception: Using $this when not in object context NULL diff --git a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt index 620f993325e06..e9575c4d0cdc3 100644 --- a/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_invoke_error1.phpt @@ -55,7 +55,7 @@ try { ?> --EXPECT-- invoke() on a non-object: -string(85) "ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, bool given" +string(85) "ReflectionMethod::invoke(): Argument #1 ($object) must be of type ?object, true given" invoke() on a non-instance: string(72) "Given object is not an instance of the class this method was declared in" diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index fe50f2a8e8f70..168c5c7f1d44a 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -62,19 +62,19 @@ static zend_result verify_bool_return_type_userland_calls(const zval* value) if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == -1)) { /* TODO Why are exception cheked? */ if (!EG(exception)) { - php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); + php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); } return FAILURE; } if ((Z_TYPE_P(value) == IS_LONG) && (Z_LVAL_P(value) == 0)) { /* TODO Why are exception cheked? */ if (!EG(exception)) { - php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); + php_error_docref(NULL, E_DEPRECATED, "Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); } return SUCCESS; } if (!EG(exception)) { - zend_type_error("Session callback must have a return value of type bool, %s returned", zend_zval_type_name(value)); \ + zend_type_error("Session callback must have a return value of type bool, %s returned", zend_zval_value_name(value)); \ } return FAILURE; } diff --git a/ext/session/session.c b/ext/session/session.c index 4bfc973ed537b..facd67379fed7 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2553,7 +2553,7 @@ PHP_FUNCTION(session_start) break; default: zend_type_error("%s(): Option \"%s\" must be of type string|int|bool, %s given", - get_active_function_name(), ZSTR_VAL(str_idx), zend_zval_type_name(value) + get_active_function_name(), ZSTR_VAL(str_idx), zend_zval_value_name(value) ); RETURN_THROWS(); } diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 20537989d0711..d3f2865e12036 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -496,7 +496,7 @@ static zval *sxe_prop_dim_write(zend_object *object, zval *member, zval *value, if (member == &tmp_zv) { zval_ptr_dtor_str(&tmp_zv); } - zend_type_error("It's not possible to assign a complex type to %s, %s given", attribs ? "attributes" : "properties", zend_zval_type_name(value)); + zend_type_error("It's not possible to assign a complex type to %s, %s given", attribs ? "attributes" : "properties", zend_zval_value_name(value)); return &EG(error_zval); } } @@ -2605,7 +2605,7 @@ PHP_FUNCTION(simplexml_import_dom) nodep = php_libxml_import_node(node); if (!nodep) { - zend_argument_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_type_name(node)); + zend_argument_type_error(1, "must be of type SimpleXMLElement|DOMNode, %s given", zend_zval_value_name(node)); RETURN_THROWS(); } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index e2e69f64ca620..44a3a3519f430 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -667,7 +667,7 @@ static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht) /* {{{ */ zend_string *name; if (Z_TYPE_P(tmp) != IS_ARRAY) { - zend_type_error("SoapHeader::__construct(): \"typemap\" option must be of type array, %s given", zend_zval_type_name(tmp)); + zend_type_error("SoapHeader::__construct(): \"typemap\" option must be of type array, %s given", zend_zval_value_name(tmp)); return NULL; } ht2 = Z_ARRVAL_P(tmp); @@ -1089,7 +1089,7 @@ PHP_METHOD(SoapServer, addFunction) RETURN_THROWS(); } } else { - zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_type_name(function_name)); + zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_value_name(function_name)); RETURN_THROWS(); } @@ -2414,7 +2414,7 @@ void soap_client_call_impl(INTERNAL_FUNCTION_PARAMETERS, bool is_soap_call) Z_ADDREF_P(headers); free_soap_headers = 1; } else { - zend_argument_type_error(4, "must be of type SoapHeader|array|null, %s given", zend_zval_type_name(headers)); + zend_argument_type_error(4, "must be of type SoapHeader|array|null, %s given", zend_zval_value_name(headers)); RETURN_THROWS(); } @@ -2678,7 +2678,7 @@ PHP_METHOD(SoapClient, __setSoapHeaders) zval_ptr_dtor(Z_CLIENT_DEFAULT_HEADERS_P(this_ptr)); ZVAL_COPY_VALUE(Z_CLIENT_DEFAULT_HEADERS_P(this_ptr), &default_headers); } else { - zend_argument_type_error(1, "must be of type SoapHeader|array|null, %s given", zend_zval_type_name(headers)); + zend_argument_type_error(1, "must be of type SoapHeader|array|null, %s given", zend_zval_value_name(headers)); RETURN_THROWS(); } RETURN_TRUE; diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index ed6f729dcc909..573b3976701f6 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -505,7 +505,7 @@ static int php_sock_array_to_fd_set(uint32_t arg_num, zval *sock_array, fd_set * ZVAL_DEREF(element); if (Z_TYPE_P(element) != IS_OBJECT || Z_OBJCE_P(element) != socket_ce) { - zend_argument_type_error(arg_num, "must only have elements of type Socket, %s given", zend_zval_type_name(element)); + zend_argument_type_error(arg_num, "must only have elements of type Socket, %s given", zend_zval_value_name(element)); return -1; } diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 4357c9d16b52f..e25b9315c7c7f 100644 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -79,7 +79,7 @@ PHP_FUNCTION(class_parents) } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } @@ -111,7 +111,7 @@ PHP_FUNCTION(class_implements) RETURN_THROWS(); } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } @@ -139,7 +139,7 @@ PHP_FUNCTION(class_uses) RETURN_THROWS(); } if (Z_TYPE_P(obj) != IS_OBJECT && Z_TYPE_P(obj) != IS_STRING) { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(obj)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(obj)); RETURN_THROWS(); } diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 5c32e2f9ee359..d1dc2e2027495 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1964,7 +1964,7 @@ static zend_result spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesys if (Z_TYPE(retval) != IS_STRING) { zend_type_error("%s::getCurrentLine(): Return value must be of type string, %s returned", - ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), zend_zval_type_name(&retval)); + ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), zend_zval_value_name(&retval)); zval_ptr_dtor(&retval); return FAILURE; } diff --git a/ext/spl/tests/array_026.phpt b/ext/spl/tests/array_026.phpt index 268b39d5e8edd..4ebd0ed925740 100644 --- a/ext/spl/tests/array_026.phpt +++ b/ext/spl/tests/array_026.phpt @@ -10,7 +10,7 @@ var_dump($test, $test3['mmmmm']); --EXPECTF-- Warning: Undefined variable $test3 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d object(ArrayObject)#1 (1) { ["storage":"ArrayObject":private]=> array(1) { diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt index 073530926a6f1..758649e231692 100644 --- a/ext/spl/tests/bug62978.phpt +++ b/ext/spl/tests/bug62978.phpt @@ -34,7 +34,7 @@ NULL Warning: Undefined variable $c in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d NULL Warning: Undefined array key "epic_magic" in %s on line %d diff --git a/ext/spl/tests/bug73029.phpt b/ext/spl/tests/bug73029.phpt index 61a3f36b6d841..771e81d5c4d45 100644 --- a/ext/spl/tests/bug73029.phpt +++ b/ext/spl/tests/bug73029.phpt @@ -23,5 +23,5 @@ Error at offset 10 of 19 bytes Warning: unserialize(): Error at offset 22 of 43 bytes in %s on line %d -Warning: Trying to access array offset on value of type bool in %s on line %d +Warning: Trying to access array offset on false in %s on line %d DONE diff --git a/ext/spl/tests/class_implements_variation1.phpt b/ext/spl/tests/class_implements_variation1.phpt index 2843745171bbf..1f7892f128340 100644 --- a/ext/spl/tests/class_implements_variation1.phpt +++ b/ext/spl/tests/class_implements_variation1.phpt @@ -158,16 +158,16 @@ class_implements(): Argument #1 ($object_or_class) must be of type object|string class_implements(): Argument #1 ($object_or_class) must be of type object|string, null given --lowercase true-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, true given --lowercase false-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, false given --uppercase TRUE-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, true given --uppercase FALSE-- -class_implements(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_implements(): Argument #1 ($object_or_class) must be of type object|string, false given --empty string DQ-- Error: 2 - class_implements(): Class does not exist and could not be loaded, %s(%d) diff --git a/ext/spl/tests/class_uses_variation1.phpt b/ext/spl/tests/class_uses_variation1.phpt index da26b2630185a..016a9cc0d2f41 100644 --- a/ext/spl/tests/class_uses_variation1.phpt +++ b/ext/spl/tests/class_uses_variation1.phpt @@ -158,16 +158,16 @@ class_uses(): Argument #1 ($object_or_class) must be of type object|string, null class_uses(): Argument #1 ($object_or_class) must be of type object|string, null given --lowercase true-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, true given --lowercase false-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, false given --uppercase TRUE-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, true given --uppercase FALSE-- -class_uses(): Argument #1 ($object_or_class) must be of type object|string, bool given +class_uses(): Argument #1 ($object_or_class) must be of type object|string, false given --empty string DQ-- Error: 2 - class_uses(): Class does not exist and could not be loaded, %s(%d) diff --git a/ext/standard/array.c b/ext/standard/array.c index b6650284cada3..8c144c388bf37 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -670,7 +670,7 @@ PHP_FUNCTION(count) } ZEND_FALLTHROUGH; default: - zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_type_name(array)); + zend_argument_type_error(1, "must be of type Countable|array, %s given", zend_zval_value_name(array)); RETURN_THROWS(); } } @@ -1176,7 +1176,7 @@ PHP_FUNCTION(min) /* mixed min ( array $values ) */ if (argc == 1) { if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } else { zval *result = zend_hash_minmax(Z_ARRVAL(args[0]), php_data_compare, 0); @@ -1222,7 +1222,7 @@ PHP_FUNCTION(max) /* mixed max ( array $values ) */ if (argc == 1) { if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } else { zval *result = zend_hash_minmax(Z_ARRVAL(args[0]), php_data_compare, 1); @@ -2495,7 +2495,7 @@ static void php_compact_var(HashTable *eg_active_symbol_table, zval *return_valu Z_UNPROTECT_RECURSION_P(entry); } } else { - php_error_docref(NULL, E_WARNING, "Argument #%d must be string or array of strings, %s given", pos, zend_zval_type_name(entry)); + php_error_docref(NULL, E_WARNING, "Argument #%d must be string or array of strings, %s given", pos, zend_zval_value_name(entry)); return; } } @@ -3829,7 +3829,7 @@ static zend_always_inline void php_array_replace_wrapper(INTERNAL_FUNCTION_PARAM zval *arg = args + i; if (Z_TYPE_P(arg) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(arg)); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(arg)); RETURN_THROWS(); } } @@ -3873,7 +3873,7 @@ static zend_always_inline void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMET zval *arg = args + i; if (Z_TYPE_P(arg) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(arg)); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(arg)); RETURN_THROWS(); } count += zend_hash_num_elements(Z_ARRVAL_P(arg)); @@ -4672,7 +4672,7 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa for (i = 0; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -4820,7 +4820,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int for (i = 0; i < arr_argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); arr_argc = i; /* only free up to i - 1 */ goto out; } @@ -5057,7 +5057,7 @@ static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_ty for (i = 0; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5205,7 +5205,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_ for (i = 0; i < arr_argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); arr_argc = i; /* only free up to i - 1 */ goto out; } @@ -5387,7 +5387,7 @@ PHP_FUNCTION(array_diff) ZEND_PARSE_PARAMETERS_END(); if (Z_TYPE(args[0]) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array, %s given", zend_zval_type_name(&args[0])); + zend_argument_type_error(1, "must be of type array, %s given", zend_zval_value_name(&args[0])); RETURN_THROWS(); } @@ -5395,7 +5395,7 @@ PHP_FUNCTION(array_diff) if (num == 0) { for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5412,7 +5412,7 @@ PHP_FUNCTION(array_diff) if (!value) { for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } } @@ -5423,7 +5423,7 @@ PHP_FUNCTION(array_diff) for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } if (!found) { @@ -5453,7 +5453,7 @@ PHP_FUNCTION(array_diff) num = 0; for (i = 1; i < argc; i++) { if (Z_TYPE(args[i]) != IS_ARRAY) { - zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_type_name(&args[i])); + zend_argument_type_error(i + 1, "must be of type array, %s given", zend_zval_value_name(&args[i])); RETURN_THROWS(); } num += zend_hash_num_elements(Z_ARRVAL(args[i])); @@ -6135,7 +6135,7 @@ PHP_FUNCTION(array_map) int ret; if (Z_TYPE(arrays[0]) != IS_ARRAY) { - zend_argument_type_error(2, "must be of type array, %s given", zend_zval_type_name(&arrays[0])); + zend_argument_type_error(2, "must be of type array, %s given", zend_zval_value_name(&arrays[0])); RETURN_THROWS(); } maxlen = zend_hash_num_elements(Z_ARRVAL(arrays[0])); @@ -6172,7 +6172,7 @@ PHP_FUNCTION(array_map) for (i = 0; i < n_arrays; i++) { if (Z_TYPE(arrays[i]) != IS_ARRAY) { - zend_argument_type_error(i + 2, "must be of type array, %s given", zend_zval_type_name(&arrays[i])); + zend_argument_type_error(i + 2, "must be of type array, %s given", zend_zval_value_name(&arrays[i])); efree(array_pos); RETURN_THROWS(); } diff --git a/ext/standard/mail.c b/ext/standard/mail.c index ef4c8c60a874e..9b3b3ed75f3cf 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -121,7 +121,7 @@ static void php_mail_build_headers_elem(smart_str *s, zend_string *key, zval *va php_mail_build_headers_elems(s, key, val); break; default: - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); } } @@ -137,7 +137,7 @@ static void php_mail_build_headers_elems(smart_str *s, zend_string *key, zval *v break; } if (Z_TYPE_P(tmp_val) != IS_STRING) { - zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), zend_zval_type_name(tmp_val)); + zend_type_error("Header \"%s\" must only contain values of type string, %s found", ZSTR_VAL(key), zend_zval_value_name(tmp_val)); break; } php_mail_build_headers_elem(s, key, tmp_val); diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h index 4e2f57749dd90..9536d1f62616d 100644 --- a/ext/standard/php_mail.h +++ b/ext/standard/php_mail.h @@ -33,7 +33,7 @@ do { \ } \ php_mail_build_headers_elems(&s, key, val); \ } else { \ - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \ + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); \ } \ } while(0) @@ -45,7 +45,7 @@ do { \ } else if (Z_TYPE_P(val) == IS_ARRAY) { \ php_mail_build_headers_elems(&s, key, val); \ } else { \ - zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_type_name(val)); \ + zend_type_error("Header \"%s\" must be of type array|string, %s given", ZSTR_VAL(key), zend_zval_value_name(val)); \ } \ } while(0) diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 53ec6faa1019e..dfffed6cfbe36 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -900,7 +900,7 @@ static zend_result set_proc_descriptor_from_array(zval *descitem, descriptorspec goto finish; } if (Z_TYPE_P(ztarget) != IS_LONG) { - zend_value_error("Redirection target must be of type int, %s given", zend_zval_type_name(ztarget)); + zend_value_error("Redirection target must be of type int, %s given", zend_zval_value_name(ztarget)); goto finish; } diff --git a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt b/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt index ca5ff20197c67..322cd1f0ab0bf 100644 --- a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt +++ b/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt @@ -47,15 +47,15 @@ try { DONE --EXPECT-- -- Testing array_column() column key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #2 ($column_key) must be of type string|int|null, bool given -array_column(): Argument #2 ($column_key) must be of type string|int|null, bool given +array_column(): Argument #2 ($column_key) must be of type string|int|null, false given +array_column(): Argument #2 ($column_key) must be of type string|int|null, true given -- Testing array_column() column key parameter should be a string or integer (testing array) -- array_column(): Argument #2 ($column_key) must be of type string|int|null, array given -- Testing array_column() index key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #3 ($index_key) must be of type string|int|null, bool given -array_column(): Argument #3 ($index_key) must be of type string|int|null, bool given +array_column(): Argument #3 ($index_key) must be of type string|int|null, false given +array_column(): Argument #3 ($index_key) must be of type string|int|null, true given -- Testing array_column() index key parameter should be a string or integer (testing array) -- array_column(): Argument #3 ($index_key) must be of type string|int|null, array given diff --git a/ext/standard/tests/array/array_diff_assoc_variation1.phpt b/ext/standard/tests/array/array_diff_assoc_variation1.phpt index 0909348620f5b..b16baa300f575 100644 --- a/ext/standard/tests/array/array_diff_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_diff_assoc_variation1.phpt @@ -133,16 +133,16 @@ array_diff_assoc(): Argument #1 ($array) must be of type array, null given array_diff_assoc(): Argument #1 ($array) must be of type array, null given -- Iteration 12 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, true given -- Iteration 13 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 14 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, true given -- Iteration 15 -- -array_diff_assoc(): Argument #1 ($array) must be of type array, bool given +array_diff_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 16 -- array_diff_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_assoc_variation2.phpt b/ext/standard/tests/array/array_diff_assoc_variation2.phpt index 76967f2ce77be..a0b1bac329d9a 100644 --- a/ext/standard/tests/array/array_diff_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_diff_assoc_variation2.phpt @@ -133,16 +133,16 @@ array_diff_assoc(): Argument #2 must be of type array, null given array_diff_assoc(): Argument #2 must be of type array, null given -- Iteration 12 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, true given -- Iteration 13 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, false given -- Iteration 14 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, true given -- Iteration 15 -- -array_diff_assoc(): Argument #2 must be of type array, bool given +array_diff_assoc(): Argument #2 must be of type array, false given -- Iteration 16 -- array_diff_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_key_variation1.phpt b/ext/standard/tests/array/array_diff_key_variation1.phpt index 525df63819b33..7b422153a0a0f 100644 --- a/ext/standard/tests/array/array_diff_key_variation1.phpt +++ b/ext/standard/tests/array/array_diff_key_variation1.phpt @@ -147,20 +147,20 @@ array_diff_key(): Argument #1 ($array) must be of type array, null given array_diff_key(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, true given +array_diff_key(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, false given +array_diff_key(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, true given +array_diff_key(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_key(): Argument #1 ($array) must be of type array, bool given -array_diff_key(): Argument #1 ($array) must be of type array, bool given +array_diff_key(): Argument #1 ($array) must be of type array, false given +array_diff_key(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_key(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_key_variation2.phpt b/ext/standard/tests/array/array_diff_key_variation2.phpt index a6e7201cb7a49..b7093606c60ae 100644 --- a/ext/standard/tests/array/array_diff_key_variation2.phpt +++ b/ext/standard/tests/array/array_diff_key_variation2.phpt @@ -148,20 +148,20 @@ array_diff_key(): Argument #2 must be of type array, null given array_diff_key(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, true given +array_diff_key(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, false given +array_diff_key(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, true given +array_diff_key(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_key(): Argument #2 must be of type array, bool given -array_diff_key(): Argument #2 must be of type array, bool given +array_diff_key(): Argument #2 must be of type array, false given +array_diff_key(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_key(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt index 7c02e5d142759..49d6903a90eab 100644 --- a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt @@ -143,16 +143,16 @@ array_diff_uassoc(): Argument #1 ($array) must be of type array, null given array_diff_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_diff_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt index 36fd109bb6c8b..7466da23d4260 100644 --- a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt @@ -143,16 +143,16 @@ array_diff_uassoc(): Argument #2 must be of type array, null given array_diff_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_uassoc(): Argument #2 must be of type array, bool given +array_diff_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_ukey_variation1.phpt b/ext/standard/tests/array/array_diff_ukey_variation1.phpt index 9e15307f23331..125406497eda8 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation1.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation1.phpt @@ -155,20 +155,20 @@ array_diff_ukey(): Argument #1 ($array) must be of type array, null given array_diff_ukey(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given +array_diff_ukey(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given -array_diff_ukey(): Argument #1 ($array) must be of type array, bool given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given +array_diff_ukey(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_diff_ukey(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_ukey_variation2.phpt b/ext/standard/tests/array/array_diff_ukey_variation2.phpt index dd79e53b5e220..cf71a26d22be1 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation2.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation2.phpt @@ -159,20 +159,20 @@ array_diff_ukey(): Argument #2 must be of type array, null given array_diff_ukey(): Argument #2 must be of type array, null given --lowercase true-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, true given +array_diff_ukey(): Argument #2 must be of type array, true given --lowercase false-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, false given +array_diff_ukey(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, true given +array_diff_ukey(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_diff_ukey(): Argument #2 must be of type array, bool given -array_diff_ukey(): Argument #2 must be of type array, bool given +array_diff_ukey(): Argument #2 must be of type array, false given +array_diff_ukey(): Argument #2 must be of type array, false given --empty string DQ-- array_diff_ukey(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_variation1.phpt b/ext/standard/tests/array/array_diff_variation1.phpt index 075cf66f7bd41..1031b6f947e0c 100644 --- a/ext/standard/tests/array/array_diff_variation1.phpt +++ b/ext/standard/tests/array/array_diff_variation1.phpt @@ -122,13 +122,13 @@ echo "Done"; -- Iteration 11 --array_diff(): Argument #1 ($array) must be of type array, null given --- Iteration 12 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 12 --array_diff(): Argument #1 ($array) must be of type array, true given --- Iteration 13 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 13 --array_diff(): Argument #1 ($array) must be of type array, false given --- Iteration 14 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 14 --array_diff(): Argument #1 ($array) must be of type array, true given --- Iteration 15 --array_diff(): Argument #1 ($array) must be of type array, bool given +-- Iteration 15 --array_diff(): Argument #1 ($array) must be of type array, false given -- Iteration 16 --array_diff(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_diff_variation2.phpt b/ext/standard/tests/array/array_diff_variation2.phpt index 68e933e29924b..2b03f22513695 100644 --- a/ext/standard/tests/array/array_diff_variation2.phpt +++ b/ext/standard/tests/array/array_diff_variation2.phpt @@ -121,13 +121,13 @@ echo "Done"; -- Iteration 11 --array_diff(): Argument #2 must be of type array, null given --- Iteration 12 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_diff(): Argument #2 must be of type array, true given --- Iteration 13 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_diff(): Argument #2 must be of type array, false given --- Iteration 14 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_diff(): Argument #2 must be of type array, true given --- Iteration 15 --array_diff(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_diff(): Argument #2 must be of type array, false given -- Iteration 16 --array_diff(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt index 72d862958b5cb..9c9cef73dd1fb 100644 --- a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt @@ -146,17 +146,17 @@ array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -- Iteration 11 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given array_intersect_assoc(): Argument #1 ($array) must be of type array, null given --- Iteration 12 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 12 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given +array_intersect_assoc(): Argument #1 ($array) must be of type array, true given --- Iteration 13 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 13 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given +array_intersect_assoc(): Argument #1 ($array) must be of type array, false given --- Iteration 14 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 14 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given +array_intersect_assoc(): Argument #1 ($array) must be of type array, true given --- Iteration 15 --array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_assoc(): Argument #1 ($array) must be of type array, bool given +-- Iteration 15 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given +array_intersect_assoc(): Argument #1 ($array) must be of type array, false given -- Iteration 16 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given array_intersect_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt index 78ed38f153b46..31b54469863af 100644 --- a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt @@ -147,17 +147,17 @@ array_intersect_assoc(): Argument #2 must be of type array, null given -- Iteration 11 --array_intersect_assoc(): Argument #2 must be of type array, null given array_intersect_assoc(): Argument #2 must be of type array, null given --- Iteration 12 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_intersect_assoc(): Argument #2 must be of type array, true given +array_intersect_assoc(): Argument #2 must be of type array, true given --- Iteration 13 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_intersect_assoc(): Argument #2 must be of type array, false given +array_intersect_assoc(): Argument #2 must be of type array, false given --- Iteration 14 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_intersect_assoc(): Argument #2 must be of type array, true given +array_intersect_assoc(): Argument #2 must be of type array, true given --- Iteration 15 --array_intersect_assoc(): Argument #2 must be of type array, bool given -array_intersect_assoc(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_intersect_assoc(): Argument #2 must be of type array, false given +array_intersect_assoc(): Argument #2 must be of type array, false given -- Iteration 16 --array_intersect_assoc(): Argument #2 must be of type array, string given array_intersect_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_key_variation1.phpt b/ext/standard/tests/array/array_intersect_key_variation1.phpt index 9256234597d00..ae11e0a2ec931 100644 --- a/ext/standard/tests/array/array_intersect_key_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_key_variation1.phpt @@ -151,20 +151,20 @@ array_intersect_key(): Argument #1 ($array) must be of type array, null given array_intersect_key(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, true given +array_intersect_key(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, false given +array_intersect_key(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, true given +array_intersect_key(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_key(): Argument #1 ($array) must be of type array, bool given -array_intersect_key(): Argument #1 ($array) must be of type array, bool given +array_intersect_key(): Argument #1 ($array) must be of type array, false given +array_intersect_key(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_key(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_key_variation2.phpt b/ext/standard/tests/array/array_intersect_key_variation2.phpt index 70401e8469269..d2a8672e284c1 100644 --- a/ext/standard/tests/array/array_intersect_key_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_key_variation2.phpt @@ -152,20 +152,20 @@ array_intersect_key(): Argument #2 must be of type array, null given array_intersect_key(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, true given +array_intersect_key(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, false given +array_intersect_key(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, true given +array_intersect_key(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_key(): Argument #2 must be of type array, bool given -array_intersect_key(): Argument #2 must be of type array, bool given +array_intersect_key(): Argument #2 must be of type array, false given +array_intersect_key(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_key(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt index 268d169c886e3..ea6ce6a1a5a16 100644 --- a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt @@ -159,20 +159,20 @@ array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given +array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt index 9377a09518d2f..03a7dc8d07e5c 100644 --- a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt @@ -159,20 +159,20 @@ array_intersect_uassoc(): Argument #2 must be of type array, null given array_intersect_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, true given +array_intersect_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, false given +array_intersect_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, true given +array_intersect_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_uassoc(): Argument #2 must be of type array, bool given -array_intersect_uassoc(): Argument #2 must be of type array, bool given +array_intersect_uassoc(): Argument #2 must be of type array, false given +array_intersect_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt index 993994fc0792a..8195d45c294ea 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt @@ -157,20 +157,20 @@ array_intersect_ukey(): Argument #1 ($array) must be of type array, null given array_intersect_ukey(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given +array_intersect_ukey(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given -array_intersect_ukey(): Argument #1 ($array) must be of type array, bool given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given +array_intersect_ukey(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_intersect_ukey(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt index bdc0686774cdd..d32c0632ca5e5 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt @@ -157,20 +157,20 @@ array_intersect_ukey(): Argument #2 must be of type array, null given array_intersect_ukey(): Argument #2 must be of type array, null given --lowercase true-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, true given +array_intersect_ukey(): Argument #2 must be of type array, true given --lowercase false-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, false given +array_intersect_ukey(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, true given +array_intersect_ukey(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_intersect_ukey(): Argument #2 must be of type array, bool given -array_intersect_ukey(): Argument #2 must be of type array, bool given +array_intersect_ukey(): Argument #2 must be of type array, false given +array_intersect_ukey(): Argument #2 must be of type array, false given --empty string DQ-- array_intersect_ukey(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_variation1.phpt b/ext/standard/tests/array/array_intersect_variation1.phpt index 81b77bd4aa308..733250b69f70b 100644 --- a/ext/standard/tests/array/array_intersect_variation1.phpt +++ b/ext/standard/tests/array/array_intersect_variation1.phpt @@ -146,17 +146,17 @@ array_intersect(): Argument #1 ($array) must be of type array, null given -- Iterator 11 --array_intersect(): Argument #1 ($array) must be of type array, null given array_intersect(): Argument #1 ($array) must be of type array, null given --- Iterator 12 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 12 --array_intersect(): Argument #1 ($array) must be of type array, true given +array_intersect(): Argument #1 ($array) must be of type array, true given --- Iterator 13 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 13 --array_intersect(): Argument #1 ($array) must be of type array, false given +array_intersect(): Argument #1 ($array) must be of type array, false given --- Iterator 14 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 14 --array_intersect(): Argument #1 ($array) must be of type array, true given +array_intersect(): Argument #1 ($array) must be of type array, true given --- Iterator 15 --array_intersect(): Argument #1 ($array) must be of type array, bool given -array_intersect(): Argument #1 ($array) must be of type array, bool given +-- Iterator 15 --array_intersect(): Argument #1 ($array) must be of type array, false given +array_intersect(): Argument #1 ($array) must be of type array, false given -- Iterator 16 --array_intersect(): Argument #1 ($array) must be of type array, string given array_intersect(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_intersect_variation2.phpt b/ext/standard/tests/array/array_intersect_variation2.phpt index d98e1162960ee..b09683446b87a 100644 --- a/ext/standard/tests/array/array_intersect_variation2.phpt +++ b/ext/standard/tests/array/array_intersect_variation2.phpt @@ -147,17 +147,17 @@ array_intersect(): Argument #2 must be of type array, null given -- Iterator 11 --array_intersect(): Argument #2 must be of type array, null given array_intersect(): Argument #2 must be of type array, null given --- Iterator 12 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 12 --array_intersect(): Argument #2 must be of type array, true given +array_intersect(): Argument #2 must be of type array, true given --- Iterator 13 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 13 --array_intersect(): Argument #2 must be of type array, false given +array_intersect(): Argument #2 must be of type array, false given --- Iterator 14 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 14 --array_intersect(): Argument #2 must be of type array, true given +array_intersect(): Argument #2 must be of type array, true given --- Iterator 15 --array_intersect(): Argument #2 must be of type array, bool given -array_intersect(): Argument #2 must be of type array, bool given +-- Iterator 15 --array_intersect(): Argument #2 must be of type array, false given +array_intersect(): Argument #2 must be of type array, false given -- Iterator 16 --array_intersect(): Argument #2 must be of type array, string given array_intersect(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_recursive_variation1.phpt b/ext/standard/tests/array/array_merge_recursive_variation1.phpt index 0a72aeeccd17e..121f7969d43c4 100644 --- a/ext/standard/tests/array/array_merge_recursive_variation1.phpt +++ b/ext/standard/tests/array/array_merge_recursive_variation1.phpt @@ -157,20 +157,20 @@ echo "Done"; -- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given -- Iteration 12 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given -- Iteration 13 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given -- Iteration 14 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given -- Iteration 15 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, bool given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, bool given +-- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given +-- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given -- Iteration 16 -- -- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_recursive_variation2.phpt b/ext/standard/tests/array/array_merge_recursive_variation2.phpt index 981e7426c1d53..4588d8d160aaa 100644 --- a/ext/standard/tests/array/array_merge_recursive_variation2.phpt +++ b/ext/standard/tests/array/array_merge_recursive_variation2.phpt @@ -122,13 +122,13 @@ echo "Done"; -- Iteration 11 --array_merge_recursive(): Argument #2 must be of type array, null given --- Iteration 12 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 12 --array_merge_recursive(): Argument #2 must be of type array, true given --- Iteration 13 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 13 --array_merge_recursive(): Argument #2 must be of type array, false given --- Iteration 14 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 14 --array_merge_recursive(): Argument #2 must be of type array, true given --- Iteration 15 --array_merge_recursive(): Argument #2 must be of type array, bool given +-- Iteration 15 --array_merge_recursive(): Argument #2 must be of type array, false given -- Iteration 16 --array_merge_recursive(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_merge_variation2.phpt b/ext/standard/tests/array/array_merge_variation2.phpt index 9e7a8cab17895..2ef55565742fc 100644 --- a/ext/standard/tests/array/array_merge_variation2.phpt +++ b/ext/standard/tests/array/array_merge_variation2.phpt @@ -133,16 +133,16 @@ array_merge(): Argument #2 must be of type array, null given array_merge(): Argument #2 must be of type array, null given -- Iteration 12 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, true given -- Iteration 13 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, false given -- Iteration 14 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, true given -- Iteration 15 -- -array_merge(): Argument #2 must be of type array, bool given +array_merge(): Argument #2 must be of type array, false given -- Iteration 16 -- array_merge(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt index 21239f3ee0476..3cc54bdc4e787 100644 --- a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt @@ -131,16 +131,16 @@ array_udiff_assoc(): Argument #1 ($array) must be of type array, null given array_udiff_assoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_assoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt index 02bf34f0ecd4a..9e5c796484ae9 100644 --- a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt @@ -131,16 +131,16 @@ array_udiff_assoc(): Argument #2 must be of type array, null given array_udiff_assoc(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff_assoc(): Argument #2 must be of type array, bool given +array_udiff_assoc(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt index 6ededf9b10cee..4bf85a3c20983 100644 --- a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt @@ -132,16 +132,16 @@ array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, bool given +array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt index bc6068b5b0f1c..765e159bab543 100644 --- a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt @@ -132,16 +132,16 @@ array_udiff_uassoc(): Argument #2 must be of type array, null given array_udiff_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff_uassoc(): Argument #2 must be of type array, bool given +array_udiff_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_variation1.phpt b/ext/standard/tests/array/array_udiff_variation1.phpt index c2cb3074b495c..59cfca5968644 100644 --- a/ext/standard/tests/array/array_udiff_variation1.phpt +++ b/ext/standard/tests/array/array_udiff_variation1.phpt @@ -131,16 +131,16 @@ array_udiff(): Argument #1 ($array) must be of type array, null given array_udiff(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_udiff(): Argument #1 ($array) must be of type array, bool given +array_udiff(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_udiff(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_udiff_variation2.phpt b/ext/standard/tests/array/array_udiff_variation2.phpt index 72e814f75b000..6637692e0b25c 100644 --- a/ext/standard/tests/array/array_udiff_variation2.phpt +++ b/ext/standard/tests/array/array_udiff_variation2.phpt @@ -131,16 +131,16 @@ array_udiff(): Argument #2 must be of type array, null given array_udiff(): Argument #2 must be of type array, null given --lowercase true-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, true given --lowercase false-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_udiff(): Argument #2 must be of type array, bool given +array_udiff(): Argument #2 must be of type array, false given --empty string DQ-- array_udiff(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt index abfa224b20ea4..64e21a30d1ae9 100644 --- a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt @@ -131,16 +131,16 @@ array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt index 080d81ceee41b..4078bec27dcc0 100644 --- a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt @@ -131,16 +131,16 @@ array_uintersect_assoc(): Argument #2 must be of type array, null given array_uintersect_assoc(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect_assoc(): Argument #2 must be of type array, bool given +array_uintersect_assoc(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect_assoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt index cc92118bc2a2a..651e78e62855e 100644 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt @@ -132,16 +132,16 @@ array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null give array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, bool given +array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt index cfa7300b27414..e01d3b4e95720 100644 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt @@ -132,16 +132,16 @@ array_uintersect_uassoc(): Argument #2 must be of type array, null given array_uintersect_uassoc(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect_uassoc(): Argument #2 must be of type array, bool given +array_uintersect_uassoc(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect_uassoc(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_variation1.phpt b/ext/standard/tests/array/array_uintersect_variation1.phpt index b5442ed392419..390fc6137401b 100644 --- a/ext/standard/tests/array/array_uintersect_variation1.phpt +++ b/ext/standard/tests/array/array_uintersect_variation1.phpt @@ -131,16 +131,16 @@ array_uintersect(): Argument #1 ($array) must be of type array, null given array_uintersect(): Argument #1 ($array) must be of type array, null given --lowercase true-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, true given --lowercase false-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, false given --uppercase TRUE-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, true given --uppercase FALSE-- -array_uintersect(): Argument #1 ($array) must be of type array, bool given +array_uintersect(): Argument #1 ($array) must be of type array, false given --empty string DQ-- array_uintersect(): Argument #1 ($array) must be of type array, string given diff --git a/ext/standard/tests/array/array_uintersect_variation2.phpt b/ext/standard/tests/array/array_uintersect_variation2.phpt index 2f6b9d3e99fef..ca3a4bff3a904 100644 --- a/ext/standard/tests/array/array_uintersect_variation2.phpt +++ b/ext/standard/tests/array/array_uintersect_variation2.phpt @@ -131,16 +131,16 @@ array_uintersect(): Argument #2 must be of type array, null given array_uintersect(): Argument #2 must be of type array, null given --lowercase true-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, true given --lowercase false-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, false given --uppercase TRUE-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, true given --uppercase FALSE-- -array_uintersect(): Argument #2 must be of type array, bool given +array_uintersect(): Argument #2 must be of type array, false given --empty string DQ-- array_uintersect(): Argument #2 must be of type array, string given diff --git a/ext/standard/tests/array/bug77931.phpt b/ext/standard/tests/array/bug77931.phpt index 4f73daeb07e82..d876d4b01c6af 100644 --- a/ext/standard/tests/array/bug77931.phpt +++ b/ext/standard/tests/array/bug77931.phpt @@ -22,5 +22,5 @@ try { ?> --EXPECT-- array_map(): Argument #3 must be of type array, int given -array_map(): Argument #4 must be of type array, bool given +array_map(): Argument #4 must be of type array, true given array_map(): Argument #5 must be of type array, null given diff --git a/ext/standard/tests/array/compact.phpt b/ext/standard/tests/array/compact.phpt index d4c6236c03e47..7d139cf2f0365 100644 --- a/ext/standard/tests/array/compact.phpt +++ b/ext/standard/tests/array/compact.phpt @@ -28,10 +28,10 @@ array(2) { string(2) "CA" } -Warning: compact(): Argument #1 must be string or array of strings, bool given in %s on line %d +Warning: compact(): Argument #1 must be string or array of strings, true given in %s on line %d Warning: compact(): Argument #2 must be string or array of strings, int given in %s on line %d array(1) { ["bar"]=> string(3) "baz" -} \ No newline at end of file +} diff --git a/ext/standard/tests/array/count_invalid.phpt b/ext/standard/tests/array/count_invalid.phpt index fd7e3356eaefa..d05c6a1961eeb 100644 --- a/ext/standard/tests/array/count_invalid.phpt +++ b/ext/standard/tests/array/count_invalid.phpt @@ -50,6 +50,6 @@ try { count(): Argument #1 ($value) must be of type Countable|array, null given count(): Argument #1 ($value) must be of type Countable|array, string given count(): Argument #1 ($value) must be of type Countable|array, int given -count(): Argument #1 ($value) must be of type Countable|array, bool given -count(): Argument #1 ($value) must be of type Countable|array, bool given +count(): Argument #1 ($value) must be of type Countable|array, true given +count(): Argument #1 ($value) must be of type Countable|array, false given count(): Argument #1 ($value) must be of type Countable|array, stdClass given diff --git a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt index 3fc707c15ec38..f7b86a2977acf 100644 --- a/ext/standard/tests/class_object/get_class_methods_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_methods_variation_001.phpt @@ -137,16 +137,16 @@ Arg value get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, null given Arg value 1 -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value 1 -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, string given diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt index 67c468cace7c4..09f995c21fb6d 100644 --- a/ext/standard/tests/class_object/get_class_variation_001.phpt +++ b/ext/standard/tests/class_object/get_class_variation_001.phpt @@ -127,16 +127,16 @@ Arg value: (type: NULL) get_class(): Argument #1 ($object) must be of type object, null given Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, true given Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, false given Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, true given Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, bool given +get_class(): Argument #1 ($object) must be of type object, false given Arg value: (type: string) get_class(): Argument #1 ($object) must be of type object, string given diff --git a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt index 529f13ce7119c..8faeff9dd8dcf 100644 --- a/ext/standard/tests/class_object/get_parent_class_variation_002.phpt +++ b/ext/standard/tests/class_object/get_parent_class_variation_002.phpt @@ -140,16 +140,16 @@ Arg value get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, null given Arg value 1 -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value 1 -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, true given Arg value -get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given +get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, false given Arg value get_parent_class(): Argument #1 ($object_or_class) must be an object or a valid class name, string given diff --git a/ext/standard/tests/class_object/method_exists_variation_001.phpt b/ext/standard/tests/class_object/method_exists_variation_001.phpt index 5e6d34f550eea..d45d2652d11c9 100644 --- a/ext/standard/tests/class_object/method_exists_variation_001.phpt +++ b/ext/standard/tests/class_object/method_exists_variation_001.phpt @@ -140,16 +140,16 @@ Arg value method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given Arg value 1 -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, true given Arg value -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, false given Arg value 1 -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, true given Arg value -method_exists(): Argument #1 ($object_or_class) must be of type object|string, bool given +method_exists(): Argument #1 ($object_or_class) must be of type object|string, false given Arg value bool(false) diff --git a/ext/standard/tests/general_functions/array_is_list.phpt b/ext/standard/tests/general_functions/array_is_list.phpt index 1cc2886f96ab0..43510097c6f1b 100644 --- a/ext/standard/tests/general_functions/array_is_list.phpt +++ b/ext/standard/tests/general_functions/array_is_list.phpt @@ -80,8 +80,8 @@ int: threw array_is_list(): Argument #1 ($array) must be of type array, int give float: threw array_is_list(): Argument #1 ($array) must be of type array, float given string: threw array_is_list(): Argument #1 ($array) must be of type array, string given object: threw array_is_list(): Argument #1 ($array) must be of type array, stdClass given -true: threw array_is_list(): Argument #1 ($array) must be of type array, bool given -false: threw array_is_list(): Argument #1 ($array) must be of type array, bool given +true: threw array_is_list(): Argument #1 ($array) must be of type array, true given +false: threw array_is_list(): Argument #1 ($array) must be of type array, false given string key: false mixed keys: false ordered keys: true @@ -95,4 +95,4 @@ unset into order: true unset to empty: true append implicit: true append explicit: true -append with gap: false \ No newline at end of file +append with gap: false diff --git a/ext/standard/tests/mail/mail_basic7.phpt b/ext/standard/tests/mail/mail_basic7.phpt index 47614c011eb76..a43617befc981 100644 --- a/ext/standard/tests/mail/mail_basic7.phpt +++ b/ext/standard/tests/mail/mail_basic7.phpt @@ -207,7 +207,7 @@ try { } ?> ---EXPECTF-- +--EXPECT-- *** Testing mail() : basic functionality *** @@ -242,7 +242,7 @@ TypeError: Header "foo1" must only contain numeric keys, "foo2" found TypeError: Header "foo2" must only contain values of type string, array found TypeError: Header "foo3" must only contain values of type string, int found TypeError: Header "foo4" must only contain values of type string, float found -TypeError: Header "foo5" must only contain values of type string, bool found +TypeError: Header "foo5" must only contain values of type string, false found TypeError: Header "foo6" must only contain values of type string, null found TypeError: Header "foo7" must only contain values of type string, stdClass found diff --git a/ext/standard/tests/strings/join_variation2.phpt b/ext/standard/tests/strings/join_variation2.phpt index 57f570b258703..d3e9807b76055 100644 --- a/ext/standard/tests/strings/join_variation2.phpt +++ b/ext/standard/tests/strings/join_variation2.phpt @@ -120,13 +120,13 @@ join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 9 -- join(): Argument #2 ($array) must be of type ?array, float given -- Iteration 10 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, true given -- Iteration 11 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, false given -- Iteration 12 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, true given -- Iteration 13 -- -join(): Argument #2 ($array) must be of type ?array, bool given +join(): Argument #2 ($array) must be of type ?array, false given -- Iteration 14 -- join(): Argument #2 ($array) must be of type ?array, string given -- Iteration 15 -- diff --git a/ext/standard/tests/strings/vprintf_variation2.phpt b/ext/standard/tests/strings/vprintf_variation2.phpt index 22f2f152d85a2..f6d92e577402c 100644 --- a/ext/standard/tests/strings/vprintf_variation2.phpt +++ b/ext/standard/tests/strings/vprintf_variation2.phpt @@ -132,16 +132,16 @@ vprintf(): Argument #2 ($values) must be of type array, null given vprintf(): Argument #2 ($values) must be of type array, null given -- Iteration 12 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, true given -- Iteration 13 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, false given -- Iteration 14 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, true given -- Iteration 15 -- -vprintf(): Argument #2 ($values) must be of type array, bool given +vprintf(): Argument #2 ($values) must be of type array, false given -- Iteration 16 -- vprintf(): Argument #2 ($values) must be of type array, string given diff --git a/ext/standard/var.c b/ext/standard/var.c index 7c6f79aba75ff..e98cb99cf5827 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1348,7 +1348,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co classes = zend_hash_str_find_deref(options, "allowed_classes", sizeof("allowed_classes")-1); if (classes && Z_TYPE_P(classes) != IS_ARRAY && Z_TYPE_P(classes) != IS_TRUE && Z_TYPE_P(classes) != IS_FALSE) { - zend_type_error("%s(): Option \"allowed_classes\" must be of type array|bool, %s given", function_name, zend_zval_type_name(classes)); + zend_type_error("%s(): Option \"allowed_classes\" must be of type array|bool, %s given", function_name, zend_zval_value_name(classes)); goto cleanup; } @@ -1377,7 +1377,7 @@ PHPAPI void php_unserialize_with_options(zval *return_value, const char *buf, co max_depth = zend_hash_str_find_deref(options, "max_depth", sizeof("max_depth") - 1); if (max_depth) { if (Z_TYPE_P(max_depth) != IS_LONG) { - zend_type_error("%s(): Option \"max_depth\" must be of type int, %s given", function_name, zend_zval_type_name(max_depth)); + zend_type_error("%s(): Option \"max_depth\" must be of type int, %s given", function_name, zend_zval_value_name(max_depth)); goto cleanup; } if (Z_LVAL_P(max_depth) < 0) { diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index debb8b675b0c2..20bdecedb50c3 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -398,7 +398,7 @@ PHP_FUNCTION(msg_send) break; default: - zend_argument_type_error(3, "must be of type string|int|float|bool, %s given", zend_zval_type_name(message)); + zend_argument_type_error(3, "must be of type string|int|float|bool, %s given", zend_zval_value_name(message)); RETURN_THROWS(); } diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 20124dbf9110b..75cc99d7b84c6 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -187,13 +187,13 @@ PHP_METHOD(PhpToken, is) RETURN_TRUE; } } else { - zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_type_name(entry)); + zend_argument_type_error(1, "must only have elements of type string|int, %s given", zend_zval_value_name(entry)); RETURN_THROWS(); } } ZEND_HASH_FOREACH_END(); RETURN_FALSE; } else { - zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_type_name(kind)); + zend_argument_type_error(1, "must be of type string|int|array, %s given", zend_zval_value_name(kind)); RETURN_THROWS(); } } diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index d82bcfa54c66b..46727bb59ff29 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -368,7 +368,7 @@ static ZEND_FUNCTION(zend_call_method) return; } } else { - zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_type_name(class_or_object)); + zend_argument_type_error(1, "must be of type object|string, %s given", zend_zval_value_name(class_or_object)); return; } diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 10abf4447b083..14523a595af6e 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -354,7 +354,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_FALSE && Z_TYPE_P(option) != IS_TRUE) { php_error_docref(NULL, E_WARNING, "Option \"remove_all_path\" must be of type bool, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->remove_all_path = zval_get_long(option); } @@ -362,14 +362,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "comp_method", sizeof("comp_method") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"comp_method\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->comp_method = zval_get_long(option); if ((option = zend_hash_str_find(options, "comp_flags", sizeof("comp_flags") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"comp_flags\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->comp_flags = zval_get_long(option); } @@ -379,14 +379,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "enc_method", sizeof("enc_method") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { php_error_docref(NULL, E_WARNING, "Option \"enc_method\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); } opts->enc_method = zval_get_long(option); if ((option = zend_hash_str_find(options, "enc_password", sizeof("enc_password") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"enc_password\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } opts->enc_password = Z_STRVAL_P(option); @@ -397,7 +397,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "remove_path", sizeof("remove_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"remove_path\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } @@ -417,7 +417,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "add_path", sizeof("add_path") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_STRING) { zend_type_error("Option \"add_path\" must be of type string, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } @@ -437,7 +437,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts) if ((option = zend_hash_str_find(options, "flags", sizeof("flags") - 1)) != NULL) { if (Z_TYPE_P(option) != IS_LONG) { zend_type_error("Option \"flags\" must be of type int, %s given", - zend_zval_type_name(option)); + zend_zval_value_name(option)); return -1; } opts->flags = Z_LVAL_P(option); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 0cc566b544d00..8b57a59ee39f7 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -853,7 +853,7 @@ static bool zlib_create_dictionary_string(HashTable *options, char **dict, size_ } break; default: - zend_argument_type_error(2, "must be of type zero-terminated string or array, %s given", zend_zval_type_name(option_buffer)); + zend_argument_type_error(2, "must be of type zero-terminated string or array, %s given", zend_zval_value_name(option_buffer)); return 0; } } diff --git a/tests/lang/bug25922.phpt b/tests/lang/bug25922.phpt index a6b526ab780fa..4927bfea776ce 100644 --- a/tests/lang/bug25922.phpt +++ b/tests/lang/bug25922.phpt @@ -20,5 +20,5 @@ test(); ?> --EXPECT-- Undefined variable $data -Trying to access array offset on value of type null +Trying to access array offset on null Undefined index here: '' diff --git a/tests/lang/foreachLoop.003.phpt b/tests/lang/foreachLoop.003.phpt index c4ca3019f31f0..071e3bf422c34 100644 --- a/tests/lang/foreachLoop.003.phpt +++ b/tests/lang/foreachLoop.003.phpt @@ -33,7 +33,7 @@ echo "done.\n"; --EXPECTF-- Not an array. -Warning: foreach() argument must be of type array|object, bool given in %s on line 4 +Warning: foreach() argument must be of type array|object, true given in %s on line %d Warning: foreach() argument must be of type array|object, null given in %s on line 9 diff --git a/tests/lang/passByReference_003.phpt b/tests/lang/passByReference_003.phpt index 11c3e32c50bed..4d073822f48ce 100644 --- a/tests/lang/passByReference_003.phpt +++ b/tests/lang/passByReference_003.phpt @@ -27,7 +27,7 @@ Passing undefined by value Warning: Undefined variable $undef1 in %s on line %d -Warning: Trying to access array offset on value of type null in %s on line %d +Warning: Trying to access array offset on null in %s on line %d Inside passbyVal call: NULL