diff --git a/UPGRADING b/UPGRADING index 09a0bf7333e38..ddd96d16672f5 100644 --- a/UPGRADING +++ b/UPGRADING @@ -320,6 +320,10 @@ PHP 8.0 UPGRADE NOTES ISO 8859 aliases with underscores (ISO_8859_* and ISO8859_*) have also been removed. +- OCI8: + . Several alias functions have been marked as deprecated. + . oci_internal_debug() and its alias ociinternaldebug() have been removed. + - PCRE: . When passing invalid escape sequences they are no longer interpreted as literals. This behaviour previously required the X modifier - which is @@ -571,6 +575,8 @@ PHP 8.0 UPGRADE NOTES . Added support for constructor property promotion (declaring properties in the constructor signature). RFC: https://wiki.php.net/rfc/constructor_promotion + . Added support for `match` expression. + RFC: https://wiki.php.net/rfc/match_expression_v2 - Date: . Added DateTime::createFromInterface() and @@ -886,6 +892,9 @@ PHP 8.0 UPGRADE NOTES shell now consistently execute `%comspec% /s /c "$commandline"`, which has the same effect as executing `$commandline` (without additional quotes). +- GD: + . php_gd2.dll has been renamed to php_gd.dll. + - php-test-pack: . The test runner has been renamed from run-test.php to run-tests.php, to match its name in php-src. diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index a9a6553466c3e..6e2c8e57fdc61 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -20,6 +20,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES q. GC_COLLECTABLE flag r. Cannot implement Traversable only s. zend_fcall_info no_separation flag removed + t. Signature changes 2. Build system changes a. Abstract @@ -89,7 +90,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES j. compare_objects() handler was removed. Extensions should use compare() object handler instead and check if both arguments are objects and have the same compare handler, using ZEND_COMPARE_OBJECTS_FALLBACK() macro. - + k. The 'I' length modifier, used to denote 32 and 64bit integer from the custom snprintf and spprintf implementations has been removed. Use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in @@ -136,11 +137,22 @@ PHP 8.0 INTERNALS UPGRADE NOTES zend_create_internal_iterator_zval(return_value, ZEND_THIS); } - s. The zend_fcall_info no_separation flag has been removed, and separation is + s. The zend_fcall_info no_separation flag has been removed, and separation is never allowed. If you wish to pass (or allow passing) arguments by reference, explicitly create those arguments as references using ZEND_MAKE_REF. + t. The following ZEND_API function have changed signature: + 1. Void in Zend Engine 4.0: + - add_assoc_*() + - add_index_*() + - add_property_*() + - object_init() + - zend_declare_class_constant*() + - zend_declare_property*() + - zend_startup_modules() + - zend_wrong_parameters_none_error() + ======================== 2. Build system changes ======================== diff --git a/Zend/tests/018.phpt b/Zend/tests/018.phpt index 74c5edcb1fc4e..f348c2b556cbf 100644 --- a/Zend/tests/018.phpt +++ b/Zend/tests/018.phpt @@ -18,7 +18,7 @@ var_dump(constant("TEST_CONST2")); echo "Done\n"; ?> --EXPECT-- -Undefined constant '' +Undefined constant "" int(1) string(4) "test" Done diff --git a/Zend/tests/024.phpt b/Zend/tests/024.phpt index 798ba7321475a..22d93483fed87 100644 --- a/Zend/tests/024.phpt +++ b/Zend/tests/024.phpt @@ -41,17 +41,17 @@ NULL Warning: Undefined variable $b in %s on line %d int(1) -Warning: Attempt to read property '1' on int in %s on line %d +Warning: Attempt to read property "1" on int in %s on line %d NULL -Warning: Attempt to read property '1' on int in %s on line %d +Warning: Attempt to read property "1" on int in %s on line %d 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: Attempt to read property '1' on int in %s on line %d +Warning: Attempt to read property "1" on int in %s on line %d -Warning: Attempt to read property '' on null in %s on line %d +Warning: Attempt to read property "" on null in %s on line %d NULL diff --git a/Zend/tests/026.phpt b/Zend/tests/026.phpt index 6c2b206184070..fff2c99f6201c 100644 --- a/Zend/tests/026.phpt +++ b/Zend/tests/026.phpt @@ -22,7 +22,7 @@ print "ok\n"; ?> --EXPECTF-- -Warning: Attempt to read property 'a' on null in %s on line %d +Warning: Attempt to read property "a" on null in %s on line %d ok -Attempt to assign property 'a' on null +Attempt to assign property "a" on null ok diff --git a/Zend/tests/028.phpt b/Zend/tests/028.phpt index e9673020fdb8d..e54fd5ac38b2a 100644 --- a/Zend/tests/028.phpt +++ b/Zend/tests/028.phpt @@ -18,7 +18,7 @@ bool(true) bool(true) bool(true) -Notice: Undefined offset: 2 in %s on line %d +Notice: Undefined array key 2 in %s on line %d Fatal error: Uncaught Error: Value of type null is not callable in %s:%d Stack trace: diff --git a/Zend/tests/033.phpt b/Zend/tests/033.phpt index 8247b5907ec82..22e4b6a12097f 100644 --- a/Zend/tests/033.phpt +++ b/Zend/tests/033.phpt @@ -61,6 +61,6 @@ Warning: Trying to access array offset on value of type null in %s on line %d Warning: Trying to access array offset on value of type 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 -Attempt to assign property 'bar' on null +Warning: Attempt to read property "foo" on null in %s on line %d +Attempt to assign property "foo" on null +Attempt to assign property "bar" on null diff --git a/Zend/tests/037.phpt b/Zend/tests/037.phpt index ef70310e6d4a3..7fe8b2f6bf4f9 100644 --- a/Zend/tests/037.phpt +++ b/Zend/tests/037.phpt @@ -16,7 +16,7 @@ var_dump($x::$x); --EXPECTF-- int(1) -Fatal error: Uncaught Error: Access to undeclared static property: Closure::$x in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property Closure::$x in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/access_modifiers_008.phpt b/Zend/tests/access_modifiers_008.phpt index 2d4d584a8f67e..70e789e99db90 100644 --- a/Zend/tests/access_modifiers_008.phpt +++ b/Zend/tests/access_modifiers_008.phpt @@ -18,4 +18,4 @@ B2::test(); ?> --EXPECTF-- -Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d +Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d diff --git a/Zend/tests/access_modifiers_009.phpt b/Zend/tests/access_modifiers_009.phpt index 452b5406eb041..e36f609b9dcc6 100644 --- a/Zend/tests/access_modifiers_009.phpt +++ b/Zend/tests/access_modifiers_009.phpt @@ -23,4 +23,4 @@ B2::test(); --EXPECTF-- bool(false) -Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d +Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d diff --git a/Zend/tests/access_modifiers_010.phpt b/Zend/tests/access_modifiers_010.phpt index 50597ff552b6b..815a03b17c645 100644 --- a/Zend/tests/access_modifiers_010.phpt +++ b/Zend/tests/access_modifiers_010.phpt @@ -28,7 +28,7 @@ new c; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private method d::test2() from context 'a' in %s:%d +Fatal error: Uncaught Error: Call to private method d::test2() from scope a in %s:%d Stack trace: #0 %s(%d): a->test() #1 %s(%d): c->__construct() diff --git a/Zend/tests/array_offset.phpt b/Zend/tests/array_offset.phpt index 0a86bf7e9ce66..9243ba9cd7c03 100644 --- a/Zend/tests/array_offset.phpt +++ b/Zend/tests/array_offset.phpt @@ -11,11 +11,11 @@ Ensure "undefined offset" notice formats message correctly when undefined key is echo "Done\n"; ?> --EXPECTF-- -Notice: Undefined offset: -1 in %s on line 3 +Notice: Undefined array key -1 in %s on line %d -Notice: Undefined offset: -1 in %s on line 4 +Notice: Undefined array key -1 in %s on line %d -Notice: Undefined offset: -1 in %s on line 5 +Notice: Undefined array key -1 in %s on line 5 -Notice: Undefined offset: -1 in %s on line 6 +Notice: Undefined array key -1 in %s on line 6 Done diff --git a/Zend/tests/array_unpack/classes.phpt b/Zend/tests/array_unpack/classes.phpt index a459a229e3062..9636058055d6d 100644 --- a/Zend/tests/array_unpack/classes.phpt +++ b/Zend/tests/array_unpack/classes.phpt @@ -43,4 +43,4 @@ array(3) { [2]=> int(3) } -Exception: Cannot declare self-referencing constant 'self::B' +Exception: Cannot declare self-referencing constant self::B diff --git a/Zend/tests/assign_dim_obj_null_return.phpt b/Zend/tests/assign_dim_obj_null_return.phpt index 1f1a5a9862d60..b046a865137aa 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 bool +Attempt to assign property "foo" on bool diff --git a/Zend/tests/attributes/003_ast_nodes.phpt b/Zend/tests/attributes/003_ast_nodes.phpt index 5bfffb8100dcd..afdab838f84b5 100644 --- a/Zend/tests/attributes/003_ast_nodes.phpt +++ b/Zend/tests/attributes/003_ast_nodes.phpt @@ -104,6 +104,5 @@ array(1) { } int(1) -string(30) "Class 'MissingClass' not found" -string(30) "Class 'MissingClass' not found" - +string(30) "Class "MissingClass" not found" +string(30) "Class "MissingClass" not found" diff --git a/Zend/tests/attributes/005_objects.phpt b/Zend/tests/attributes/005_objects.phpt index f213ed54b6228..712ec93beaf4f 100644 --- a/Zend/tests/attributes/005_objects.phpt +++ b/Zend/tests/attributes/005_objects.phpt @@ -108,13 +108,13 @@ string(7) "ERROR 2" string(74) "A1::__construct(): Argument #1 ($name) must be of type string, array given" string(7) "ERROR 3" -string(30) "Attribute class 'A2' not found" +string(30) "Attribute class "A2" not found" string(7) "ERROR 4" -string(50) "Attribute constructor of class 'A3' must be public" +string(48) "Attribute constructor of class A3 must be public" string(7) "ERROR 5" -string(71) "Attribute class 'A4' does not have a constructor, cannot pass arguments" +string(69) "Attribute class A4 does not have a constructor, cannot pass arguments" string(7) "ERROR 6" -string(55) "Attempting to use non-attribute class 'A5' as attribute" +string(55) "Attempting to use non-attribute class "A5" as attribute" diff --git a/Zend/tests/attributes/006_filter.phpt b/Zend/tests/attributes/006_filter.phpt index 2b7cc9dcdbbb9..49c02d6e35017 100644 --- a/Zend/tests/attributes/006_filter.phpt +++ b/Zend/tests/attributes/006_filter.phpt @@ -109,4 +109,4 @@ Array string(7) "ERROR 1" string(103) "ReflectionFunctionAbstract::getAttributes(): Argument #2 ($flags) must be a valid attribute filter flag" string(7) "ERROR 2" -string(34) "Class 'SomeMissingClass' not found" +string(34) "Class "SomeMissingClass" not found" diff --git a/Zend/tests/attributes/013_class_scope.phpt b/Zend/tests/attributes/013_class_scope.phpt index 3bb2b303ba9a2..94764c2d69088 100644 --- a/Zend/tests/attributes/013_class_scope.phpt +++ b/Zend/tests/attributes/013_class_scope.phpt @@ -34,7 +34,7 @@ trait T1 class C2 { use T1; - + private const FOO = 'bar'; } @@ -109,7 +109,7 @@ Array [1] => bar ) string(7) "ERROR 1" -string(36) "Undefined class constant 'self::FOO'" +string(28) "Undefined constant self::FOO" bool(true) string(3) "bar" diff --git a/Zend/tests/attributes/023_ast_node_in_validation.phpt b/Zend/tests/attributes/023_ast_node_in_validation.phpt index af0d0b767d401..57a7287cae280 100644 --- a/Zend/tests/attributes/023_ast_node_in_validation.phpt +++ b/Zend/tests/attributes/023_ast_node_in_validation.phpt @@ -8,4 +8,4 @@ class A1 { } ?> --EXPECTF-- -Fatal error: Class 'Foo' not found in %s +Fatal error: Class "Foo" not found in %s on line %d diff --git a/Zend/tests/bug29015.phpt b/Zend/tests/bug29015.phpt index d4231d10b1620..b13dc740600be 100644 --- a/Zend/tests/bug29015.phpt +++ b/Zend/tests/bug29015.phpt @@ -15,7 +15,7 @@ object(stdClass)#1 (1) { string(10) "string('')" } -Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d +Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug29883.phpt b/Zend/tests/bug29883.phpt index d9e1ae43b140f..21fe5b4d0bd6f 100644 --- a/Zend/tests/bug29883.phpt +++ b/Zend/tests/bug29883.phpt @@ -15,7 +15,7 @@ bool(false) bool(true) bool(true) -Warning: Uninitialized string offset: -10 in %s on line %d +Warning: Uninitialized string offset -10 in %s on line %d string(0) "" string(1) "u" string(1) "u" diff --git a/Zend/tests/bug30519.phpt b/Zend/tests/bug30519.phpt index f6c7d15bc8831..c449bfdfb3675 100644 --- a/Zend/tests/bug30519.phpt +++ b/Zend/tests/bug30519.phpt @@ -6,7 +6,7 @@ class test implements a { } ?> --EXPECTF-- -Fatal error: Uncaught Error: Interface 'a' not found in %s:%d +Fatal error: Uncaught Error: Interface "a" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug30922.phpt b/Zend/tests/bug30922.phpt index 7a0316bee87fe..47802c1afa2db 100644 --- a/Zend/tests/bug30922.phpt +++ b/Zend/tests/bug30922.phpt @@ -10,7 +10,7 @@ var_dump($a instanceOf A); echo "ok\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Interface 'RecurisiveFooFar' not found in %s:%d +Fatal error: Uncaught Error: Interface "RecurisiveFooFar" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug31098.phpt b/Zend/tests/bug31098.phpt index 4d01d36cd8673..f9ea43a93a910 100644 --- a/Zend/tests/bug31098.phpt +++ b/Zend/tests/bug31098.phpt @@ -44,12 +44,12 @@ ok ok ok -Warning: Attempt to read property 'wrong' on string in %s on line %d +Warning: Attempt to read property "wrong" on string in %s on line %d ok -Warning: Illegal string offset 'wrong' in %s on line %d +Warning: Illegal string offset "wrong" in %s on line %d ok ok -Warning: Illegal string offset 'wrong' in %s on line %d +Warning: Illegal string offset "wrong" in %s on line %d ok diff --git a/Zend/tests/bug31102.phpt b/Zend/tests/bug31102.phpt index fd3a4332fde88..3f25aa00e0724 100644 --- a/Zend/tests/bug31102.phpt +++ b/Zend/tests/bug31102.phpt @@ -43,7 +43,7 @@ Caught: Test1::__construct Caught: {closure} {closure}(Test3,3) -Fatal error: Uncaught Error: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1 +Fatal error: Uncaught Error: Class "Test3" not found in %s:%d Stack trace: #0 %s(%d): eval() #1 {main} diff --git a/Zend/tests/bug37632.phpt b/Zend/tests/bug37632.phpt index fbfae5b254883..13ffa62128c31 100644 --- a/Zend/tests/bug37632.phpt +++ b/Zend/tests/bug37632.phpt @@ -132,7 +132,7 @@ B2::doTest C2::test B4::doTest -Fatal error: Uncaught Error: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d +Fatal error: Uncaught Error: Call to protected C4::__construct() from scope B4 in %s:%d Stack trace: #0 %s(%d): B4::doTest() #1 {main} diff --git a/Zend/tests/bug37667.phpt b/Zend/tests/bug37667.phpt index 38adb4e9989b0..1299397d65a76 100644 --- a/Zend/tests/bug37667.phpt +++ b/Zend/tests/bug37667.phpt @@ -29,7 +29,7 @@ var_dump($obj); --EXPECTF-- string(3) "bar" -Notice: Undefined offset: 2 in %sbug37667.php on line 16 +Notice: Undefined array key 2 in %s on line %d NULL object(Test)#%d (1) { ["property":protected]=> diff --git a/Zend/tests/bug37811.phpt b/Zend/tests/bug37811.phpt index d1d5872da06d7..f3c2ee5e20d19 100644 --- a/Zend/tests/bug37811.phpt +++ b/Zend/tests/bug37811.phpt @@ -23,7 +23,7 @@ string(3) "Foo" Warning: Constants may only evaluate to scalar values, arrays or resources in %sbug37811.php on line %d -Fatal error: Uncaught Error: Undefined constant 'Baz' in %s:%d +Fatal error: Uncaught Error: Undefined constant "Baz" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug39018.phpt b/Zend/tests/bug39018.phpt index 43198b5c859cb..1e7cced175e05 100644 --- a/Zend/tests/bug39018.phpt +++ b/Zend/tests/bug39018.phpt @@ -64,39 +64,39 @@ print "\nDone\n"; --EXPECTF-- Warning: String offset cast occurred in %s on line %d -Warning: Uninitialized string offset: %s in %s on line %d +Warning: Uninitialized string offset %d in %s on line %d -Warning: Uninitialized string offset: 0 in %s on line %d +Warning: Uninitialized string offset 0 in %s on line %d -Warning: Uninitialized string offset: 0 in %s on line %d +Warning: Uninitialized string offset 0 in %s on line %d Warning: String offset cast occurred in %s on line %d -Warning: Uninitialized string offset: %i in %s on line %d +Warning: Uninitialized string offset %i in %s on line %d Warning: String offset cast occurred in %s on line %d -Warning: Uninitialized string offset: %i in %s on line %d +Warning: Uninitialized string offset %i in %s on line %d -Warning: Uninitialized string offset: 0 in %s on line %d +Warning: Uninitialized string offset 0 in %s on line %d -Warning: Uninitialized string offset: 4 in %s on line %d +Warning: Uninitialized string offset 4 in %s on line %d -Warning: Uninitialized string offset: 4 in %s on line %d +Warning: Uninitialized string offset 4 in %s on line %d -Warning: Uninitialized string offset: 4 in %s on line %d +Warning: Uninitialized string offset 4 in %s on line %d -Warning: Uninitialized string offset: 4 in %s on line %d +Warning: Uninitialized string offset 4 in %s on line %d -Warning: Uninitialized string offset: 4 in %s on line %d +Warning: Uninitialized string offset 4 in %s on line %d Warning: String offset cast occurred in %s on line %d -Warning: Uninitialized string offset: 12 in %s on line %d +Warning: Uninitialized string offset 12 in %s on line %d Warning: String offset cast occurred in %s on line %d -Warning: Uninitialized string offset: 12 in %s on line %d +Warning: Uninitialized string offset 12 in %s on line %d Warning: String offset cast occurred in %s on line %d diff --git a/Zend/tests/bug39304.phpt b/Zend/tests/bug39304.phpt index dc31073eb9488..a5422d2f4f316 100644 --- a/Zend/tests/bug39304.phpt +++ b/Zend/tests/bug39304.phpt @@ -7,6 +7,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset) var_dump($a,$b); ?> --EXPECTF-- -Warning: Uninitialized string offset: 0 in %s on line %d +Warning: Uninitialized string offset 0 in %s on line %d NULL NULL diff --git a/Zend/tests/bug41633_2.phpt b/Zend/tests/bug41633_2.phpt index 180e6ac970a6b..975d2218b55e3 100644 --- a/Zend/tests/bug41633_2.phpt +++ b/Zend/tests/bug41633_2.phpt @@ -8,7 +8,7 @@ class Foo { echo Foo::A."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined class constant 'self::B' in %sbug41633_2.php:5 +Fatal error: Uncaught Error: Undefined constant self::B in %s:%d Stack trace: #0 {main} thrown in %sbug41633_2.php on line 5 diff --git a/Zend/tests/bug41633_3.phpt b/Zend/tests/bug41633_3.phpt index c7afb65a87208..4f78194a7e7a1 100644 --- a/Zend/tests/bug41633_3.phpt +++ b/Zend/tests/bug41633_3.phpt @@ -9,7 +9,7 @@ class Foo { echo Foo::A; ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d +Fatal error: Uncaught Error: Cannot declare self-referencing constant Foo::B in %s:%d Stack trace: #0 {main} thrown in %sbug41633_3.php on line %d diff --git a/Zend/tests/bug42819.phpt b/Zend/tests/bug42819.phpt index 615aabc8ed271..d0615dae7faf9 100644 --- a/Zend/tests/bug42819.phpt +++ b/Zend/tests/bug42819.phpt @@ -297,7 +297,7 @@ Array [1] => 1 ) -Fatal error: Uncaught Error: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d +Fatal error: Uncaught Error: Undefined constant "foo\foo\unknown" in %s:%d Stack trace: #0 %s(%d): foo\oops() #1 {main} diff --git a/Zend/tests/bug42937.phpt b/Zend/tests/bug42937.phpt index 0aeeec86377e0..cedcf073a63e7 100644 --- a/Zend/tests/bug42937.phpt +++ b/Zend/tests/bug42937.phpt @@ -39,7 +39,7 @@ test3 test4 test5 -Fatal error: Uncaught Error: Call to undefined method C::test6() in %sbug42937.php:21 +Fatal error: Uncaught Error: Call to undefined method C::test6() in %s:%d Stack trace: #0 %s(%d): B->test() #1 {main} diff --git a/Zend/tests/bug43344_1.phpt b/Zend/tests/bug43344_1.phpt index aca548ba5fc0d..d517373d9f177 100644 --- a/Zend/tests/bug43344_1.phpt +++ b/Zend/tests/bug43344_1.phpt @@ -39,7 +39,7 @@ try { ?> --EXPECT-- -Undefined constant 'Foo\bar' -Undefined constant 'Foo\bar' -Undefined constant 'Foo\bar' -Undefined constant 'Foo\bar' +Undefined constant "Foo\bar" +Undefined constant "Foo\bar" +Undefined constant "Foo\bar" +Undefined constant "Foo\bar" diff --git a/Zend/tests/bug43344_10.phpt b/Zend/tests/bug43344_10.phpt index 4916b039e1cc8..31aa09c3c0f30 100644 --- a/Zend/tests/bug43344_10.phpt +++ b/Zend/tests/bug43344_10.phpt @@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant) echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_10.php:%d +Fatal error: Uncaught Error: Undefined constant "bar" in %s:%d Stack trace: #0 {main} thrown in %sbug43344_10.php on line %d diff --git a/Zend/tests/bug43344_11.phpt b/Zend/tests/bug43344_11.phpt index 47a59eb280612..6ddae2e473e01 100644 --- a/Zend/tests/bug43344_11.phpt +++ b/Zend/tests/bug43344_11.phpt @@ -8,7 +8,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_11.php:%d +Fatal error: Uncaught Error: Undefined constant "bar" in %s:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_12.phpt b/Zend/tests/bug43344_12.phpt index 3224a7de92468..91e00fb79eb44 100644 --- a/Zend/tests/bug43344_12.phpt +++ b/Zend/tests/bug43344_12.phpt @@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_12.php:%d +Fatal error: Uncaught Error: Undefined constant "bar" in %s:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_13.phpt b/Zend/tests/bug43344_13.phpt index 6b08562b29114..9d93520184789 100644 --- a/Zend/tests/bug43344_13.phpt +++ b/Zend/tests/bug43344_13.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_13.php:%d +Fatal error: Uncaught Error: Undefined constant "bar" in %s:%d Stack trace: #0 %s(%d): f() #1 {main} diff --git a/Zend/tests/bug43344_2.phpt b/Zend/tests/bug43344_2.phpt index 081f339a41e95..982d8ecacce05 100644 --- a/Zend/tests/bug43344_2.phpt +++ b/Zend/tests/bug43344_2.phpt @@ -6,7 +6,7 @@ namespace Foo; echo Foo::bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %sbug43344_2.php:%d +Fatal error: Uncaught Error: Class "Foo\Foo" not found in %s:%d Stack trace: #0 {main} thrown in %sbug43344_2.php on line %d diff --git a/Zend/tests/bug43344_3.phpt b/Zend/tests/bug43344_3.phpt index 6b1b6c46c9cc8..ebef53c94be0a 100644 --- a/Zend/tests/bug43344_3.phpt +++ b/Zend/tests/bug43344_3.phpt @@ -9,7 +9,7 @@ function f($a=Foo::bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d +Fatal error: Uncaught Error: Class "Foo\Foo" not found in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_4.phpt b/Zend/tests/bug43344_4.phpt index 0e2e3c7886ea4..a7b9b8c9b62ca 100644 --- a/Zend/tests/bug43344_4.phpt +++ b/Zend/tests/bug43344_4.phpt @@ -9,7 +9,7 @@ function f($a=array(Foo::bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d +Fatal error: Uncaught Error: Class "Foo\Foo" not found in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_5.phpt b/Zend/tests/bug43344_5.phpt index 5ca2144438f0b..0bc11e697c07e 100644 --- a/Zend/tests/bug43344_5.phpt +++ b/Zend/tests/bug43344_5.phpt @@ -10,7 +10,7 @@ function f($a=array(Foo::bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'Foo\Foo' not found in %s:%d +Fatal error: Uncaught Error: Class "Foo\Foo" not found in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_6.phpt b/Zend/tests/bug43344_6.phpt index 45aac8281f7f5..5fb661d68590c 100644 --- a/Zend/tests/bug43344_6.phpt +++ b/Zend/tests/bug43344_6.phpt @@ -6,7 +6,7 @@ namespace Foo; echo namespace\bar."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d +Fatal error: Uncaught Error: Undefined constant "Foo\bar" in %s:%d Stack trace: #0 {main} thrown in %sbug43344_6.php on line %d diff --git a/Zend/tests/bug43344_7.phpt b/Zend/tests/bug43344_7.phpt index 965419c12aaa9..f0c42cdf41a31 100644 --- a/Zend/tests/bug43344_7.phpt +++ b/Zend/tests/bug43344_7.phpt @@ -9,7 +9,7 @@ function f($a=namespace\bar) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d +Fatal error: Uncaught Error: Undefined constant "Foo\bar" in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_8.phpt b/Zend/tests/bug43344_8.phpt index b0c247c8e3868..b22aed6367781 100644 --- a/Zend/tests/bug43344_8.phpt +++ b/Zend/tests/bug43344_8.phpt @@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d +Fatal error: Uncaught Error: Undefined constant "Foo\bar" in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug43344_9.phpt b/Zend/tests/bug43344_9.phpt index edaa332b93c74..7483e0840b3be 100644 --- a/Zend/tests/bug43344_9.phpt +++ b/Zend/tests/bug43344_9.phpt @@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) { echo f()."\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d +Fatal error: Uncaught Error: Undefined constant "Foo\bar" in %s:%d Stack trace: #0 %s(%d): Foo\f() #1 {main} diff --git a/Zend/tests/bug44141.phpt b/Zend/tests/bug44141.phpt index 5ea737e46a026..814dd3c0d63c4 100644 --- a/Zend/tests/bug44141.phpt +++ b/Zend/tests/bug44141.phpt @@ -22,7 +22,7 @@ class Y extends X $y = Y::cheat(5); echo $y->x, PHP_EOL; --EXPECTF-- -Fatal error: Uncaught Error: Call to private X::__construct() from context 'Y' in %sbug44141.php:15 +Fatal error: Uncaught Error: Call to private X::__construct() from scope Y in %s:%d Stack trace: #0 %s(%d): Y::cheat(5) #1 {main} diff --git a/Zend/tests/bug44660.phpt b/Zend/tests/bug44660.phpt index 5097fa7518389..1d81677f127e9 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 bool in %s on line %d --> direct assignment: -Attempt to assign property 'p' on bool +Attempt to assign property "p" on bool --> increment: -Attempt to increment/decrement property 'p' on bool +Attempt to increment/decrement property "p" on bool --> reference assignment: -Attempt to modify property 'p' on bool +Attempt to modify property "p" on bool --> reference assignment: -Attempt to modify property 'p' on bool +Attempt to modify property "p" on bool --> indexed assignment: -Attempt to modify property 'p' on bool +Attempt to modify property "p" on bool --> Confirm assignments have had no impact: bool(true) diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt index 7e4d0e5a7331e..1a18e3800464a 100644 --- a/Zend/tests/bug45186.phpt +++ b/Zend/tests/bug45186.phpt @@ -54,4 +54,4 @@ string(1) "y" ok __callstatic: string(3) "www" -call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access "self" when no class scope is active diff --git a/Zend/tests/bug45186_2.phpt b/Zend/tests/bug45186_2.phpt index 01f5734a4f5cc..960c38196ebbb 100644 --- a/Zend/tests/bug45186_2.phpt +++ b/Zend/tests/bug45186_2.phpt @@ -52,5 +52,5 @@ string(1) "y" __call: string(1) "y" ok -call_user_func(): Argument #1 ($function) must be a valid callback, class 'bar' does not have a method 'www' -call_user_func(): Argument #1 ($function) must be a valid callback, cannot access self:: when no class scope is active +call_user_func(): Argument #1 ($function) must be a valid callback, class bar does not have a method "www" +call_user_func(): Argument #1 ($function) must be a valid callback, cannot access "self" when no class scope is active diff --git a/Zend/tests/bug46304.phpt b/Zend/tests/bug46304.phpt index f8b9a0b5251ee..c456a8bbc2263 100644 --- a/Zend/tests/bug46304.phpt +++ b/Zend/tests/bug46304.phpt @@ -32,7 +32,7 @@ value3 value3 value3 -Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d +Fatal error: Uncaught Error: Undefined constant "NS1\ns2\coNSt1" in %s:%d Stack trace: #0 {main} thrown in %sbug46304.php on line %d diff --git a/Zend/tests/bug47109.phpt b/Zend/tests/bug47109.phpt index ed1c6d706e98f..591edfa747cfa 100644 --- a/Zend/tests/bug47109.phpt +++ b/Zend/tests/bug47109.phpt @@ -7,4 +7,4 @@ $a->{"a"."b"}; --EXPECTF-- Warning: Undefined variable $a in %s on line %d -Warning: Attempt to read property 'ab' on null in %s on line %d +Warning: Attempt to read property "ab" on null in %s on line %d diff --git a/Zend/tests/bug47572.phpt b/Zend/tests/bug47572.phpt index 7a44cc6e7f9c9..1e424b350c4e9 100644 --- a/Zend/tests/bug47572.phpt +++ b/Zend/tests/bug47572.phpt @@ -14,7 +14,7 @@ $foo = new Foo(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'FOO' in %s:%d +Fatal error: Uncaught Error: Undefined constant "FOO" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug47699.phpt b/Zend/tests/bug47699.phpt index a30c8a8170987..8c6be50199463 100644 --- a/Zend/tests/bug47699.phpt +++ b/Zend/tests/bug47699.phpt @@ -15,7 +15,7 @@ new X(); ?> --EXPECTF-- BB -Fatal error: Uncaught Error: Class 'X' not found in %sbug47699.php:%d +Fatal error: Uncaught Error: Class "X" not found in %s:%d Stack trace: #0 {main} thrown in %sbug47699.php on line %d diff --git a/Zend/tests/bug48770_2.phpt b/Zend/tests/bug48770_2.phpt index f3bfffcba6e8a..de975e37a1f07 100644 --- a/Zend/tests/bug48770_2.phpt +++ b/Zend/tests/bug48770_2.phpt @@ -57,4 +57,4 @@ $c->func('This should work!'); string(27) "B::func2: This should work!" string(27) "B::func3: This should work!" call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method B::func22() -call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'B' does not have a method 'inexistent' +call_user_func_array(): Argument #1 ($function) must be a valid callback, class B does not have a method "inexistent" diff --git a/Zend/tests/bug48770_3.phpt b/Zend/tests/bug48770_3.phpt index f2b537363b560..0918755b72cdd 100644 --- a/Zend/tests/bug48770_3.phpt +++ b/Zend/tests/bug48770_3.phpt @@ -47,4 +47,4 @@ $c->func('This should work!'); --EXPECT-- string(27) "B::func2: This should work!" string(27) "B::func3: This should work!" -call_user_func_array(): Argument #1 ($function) must be a valid callback, class 'C' does not have a method 'inexistent' +call_user_func_array(): Argument #1 ($function) must be a valid callback, class C does not have a method "inexistent" diff --git a/Zend/tests/bug51791.phpt b/Zend/tests/bug51791.phpt index beb50bad909c2..7675cb564d266 100644 --- a/Zend/tests/bug51791.phpt +++ b/Zend/tests/bug51791.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- -Undefined class constant 'A::B1' +Undefined constant A::B1 diff --git a/Zend/tests/bug52041.phpt b/Zend/tests/bug52041.phpt index bc5297c8d3055..0a6bd65f0da75 100644 --- a/Zend/tests/bug52041.phpt +++ b/Zend/tests/bug52041.phpt @@ -48,22 +48,22 @@ var_dump(foo()); ?> --EXPECTF-- Warning: Undefined variable $x in %s on line %d -Attempt to assign property 'a' on null +Attempt to assign property "a" on null Warning: Undefined variable $x in %s on line %d -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $x in %s on line %d -Attempt to increment/decrement property 'a' on null +Attempt to increment/decrement property "a" on null Warning: Undefined variable $x in %s on line %d -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $x in %s on line %d -Attempt to assign property 'a' on null +Attempt to assign property "a" on null Warning: Undefined variable $x in %s on line %d -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $x in %s on line %d @@ -71,23 +71,23 @@ Warning: Undefined variable $x in %s on line %d Warning: Undefined variable $x in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d Warning: Undefined variable $x in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d Warning: Undefined variable $x in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d Warning: Undefined variable $x in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d Warning: Undefined variable $x in %s on line %d NULL diff --git a/Zend/tests/bug52484.phpt b/Zend/tests/bug52484.phpt index 9b40b4cae79f2..9b74facc58838 100644 --- a/Zend/tests/bug52484.phpt +++ b/Zend/tests/bug52484.phpt @@ -16,7 +16,7 @@ unset($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d +Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d Stack trace: #0 %s(%d): A->__unset('\x00') #1 {main} diff --git a/Zend/tests/bug52484_2.phpt b/Zend/tests/bug52484_2.phpt index 698f2d94b5be9..9b96d767e86df 100644 --- a/Zend/tests/bug52484_2.phpt +++ b/Zend/tests/bug52484_2.phpt @@ -16,7 +16,7 @@ $a->$prop = 2; ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d +Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d Stack trace: #0 %s(%d): A->__set('\x00', 2) #1 {main} diff --git a/Zend/tests/bug52484_3.phpt b/Zend/tests/bug52484_3.phpt index 3bb5743963aeb..9cf9be81394c6 100644 --- a/Zend/tests/bug52484_3.phpt +++ b/Zend/tests/bug52484_3.phpt @@ -16,7 +16,7 @@ var_dump($a->$prop); ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d +Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d Stack trace: #0 %s(%d): A->__get('\x00') #1 {main} diff --git a/Zend/tests/bug52614.phpt b/Zend/tests/bug52614.phpt index 955d873d8c0d1..f9a659cbe573e 100644 --- a/Zend/tests/bug52614.phpt +++ b/Zend/tests/bug52614.phpt @@ -75,7 +75,7 @@ array(0) { } array(0) { } -Attempt to assign property 'a' on null +Attempt to assign property "a" on null NULL object(stdClass)#3 (1) { ["a"]=> diff --git a/Zend/tests/bug53432.phpt b/Zend/tests/bug53432.phpt index 83df599313afa..68ce0e358327a 100644 --- a/Zend/tests/bug53432.phpt +++ b/Zend/tests/bug53432.phpt @@ -50,11 +50,11 @@ string(1) "a" string(1) "a" string(6) " a" -Warning: Illegal string offset: -1 in %s on line %d +Warning: Illegal string offset -1 in %s on line %d NULL string(0) "" -Warning: Illegal string offset 'foo' in %s on line %d +Warning: Illegal string offset "foo" in %s on line %d string(1) "a" string(1) "a" Error: [] operator not supported for strings diff --git a/Zend/tests/bug61025.phpt b/Zend/tests/bug61025.phpt index 00139e6a9b4da..49adea85249de 100644 --- a/Zend/tests/bug61025.phpt +++ b/Zend/tests/bug61025.phpt @@ -24,7 +24,7 @@ Warning: The magic method InvokeAble::__invoke() cannot be static in %sbug61025. Warning: The magic method Bar::__invoke() must have public visibility in %sbug61025.php on line %d Bar -Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d +Fatal error: Uncaught Error: Call to private method Bar::__invoke() from global scope in %s:%d Stack trace: #0 {main} thrown in %sbug61025.php on line %d diff --git a/Zend/tests/bug64578.phpt b/Zend/tests/bug64578.phpt index b4018e96a2fe5..e16f8ea4baa84 100644 --- a/Zend/tests/bug64578.phpt +++ b/Zend/tests/bug64578.phpt @@ -10,5 +10,5 @@ $y = '1'; x($y); print_r($y); --EXPECT-- -string(25) "Illegal string offset 'a'" +string(25) "Illegal string offset "a"" 1 diff --git a/Zend/tests/bug65784.phpt b/Zend/tests/bug65784.phpt index 8982048e12d81..8c0db4fa4a725 100644 --- a/Zend/tests/bug65784.phpt +++ b/Zend/tests/bug65784.phpt @@ -62,7 +62,7 @@ Stack trace: #0 %sbug65784.php(52): foo3() #1 {main} -Next Error: Class 'NotExists' not found in %sbug65784.php:46 +Next Error: Class "NotExists" not found in %s:%d Stack trace: #0 %sbug65784.php(52): foo3() #1 {main} diff --git a/Zend/tests/bug65911.phpt b/Zend/tests/bug65911.phpt index b9d973eb45ea6..cea7cdc1ded87 100644 --- a/Zend/tests/bug65911.phpt +++ b/Zend/tests/bug65911.phpt @@ -17,7 +17,7 @@ $obj = new B(); $obj->go(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: A::$this in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property A::$this in %s:%d Stack trace: #0 %s(%d): B->go() #1 {main} diff --git a/Zend/tests/bug68475.phpt b/Zend/tests/bug68475.phpt index 1bf74f2603c56..fef8173fc6431 100644 --- a/Zend/tests/bug68475.phpt +++ b/Zend/tests/bug68475.phpt @@ -54,4 +54,4 @@ Static method called! Static method called with args: arg1, arg2, arg3 Static method called with args: arg1, arg2, arg3 Call to undefined method TestClass::undefinedMethod() -Class 'UndefinedClass' not found +Class "UndefinedClass" not found diff --git a/Zend/tests/bug69755.phpt b/Zend/tests/bug69755.phpt index e419756d266ca..f233f44686d14 100644 --- a/Zend/tests/bug69755.phpt +++ b/Zend/tests/bug69755.phpt @@ -5,7 +5,7 @@ Bug #69755: segfault in ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER c . 10; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'c' in %s:%d +Fatal error: Uncaught Error: Undefined constant "c" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug69788.phpt b/Zend/tests/bug69788.phpt index e847b3b0a51a8..5bfa69da15d3d 100644 --- a/Zend/tests/bug69788.phpt +++ b/Zend/tests/bug69788.phpt @@ -3,7 +3,7 @@ Bug #69788: Malformed script causes Uncaught Error in php-cgi, valgrind SIGILL --FILE-- --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 't' in %s:%d +Fatal error: Uncaught Error: Undefined constant "t" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug70164.phpt b/Zend/tests/bug70164.phpt index 258d59442125b..b8053b241fc67 100644 --- a/Zend/tests/bug70164.phpt +++ b/Zend/tests/bug70164.phpt @@ -24,7 +24,7 @@ __halt_compiler(); %d %d -Fatal error: Uncaught Error: Undefined constant 'Foo\__COMPILER_HALT_OFFSET__' in %s:%d +Fatal error: Uncaught Error: Undefined constant "Foo\__COMPILER_HALT_OFFSET__" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug70895.phpt b/Zend/tests/bug70895.phpt index 9aa3706362f19..1a28d9ef5cefc 100644 --- a/Zend/tests/bug70895.phpt +++ b/Zend/tests/bug70895.phpt @@ -20,6 +20,6 @@ try { } ?> --EXPECT-- -array_map(): Argument #1 ($callback) must be a valid callback, function '%n' not found or invalid function name -array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i' not found or invalid function name -array_map(): Argument #1 ($callback) must be a valid callback, function '%n %i aoeu %f aoeu %p' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "%n" not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "%n %i" not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "%n %i aoeu %f aoeu %p" not found or invalid function name diff --git a/Zend/tests/bug70898.phpt b/Zend/tests/bug70898.phpt index ea67acaaf860a..2aff5109d836b 100644 --- a/Zend/tests/bug70898.phpt +++ b/Zend/tests/bug70898.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -array_map(): Argument #1 ($callback) must be a valid callback, function '0000000000000000000000000000000000' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "0000000000000000000000000000000000" not found or invalid function name diff --git a/Zend/tests/bug70914.phpt b/Zend/tests/bug70914.phpt index 0382076efb3a5..ff963ca9eb9d3 100644 --- a/Zend/tests/bug70914.phpt +++ b/Zend/tests/bug70914.phpt @@ -14,4 +14,4 @@ $st = $db->query('SELECT 1'); $re = $st->fetchObject('%Z'); ?> --EXPECTREGEX-- -Fatal error: Class '%Z' not found in .+bug70914.php on line \d+ +Fatal error: Class "%Z" not found in .+bug70914.php on line \d+ diff --git a/Zend/tests/bug70918.phpt b/Zend/tests/bug70918.phpt index d376d2147a953..54f3a3c72a80b 100644 --- a/Zend/tests/bug70918.phpt +++ b/Zend/tests/bug70918.phpt @@ -39,9 +39,9 @@ try { } ?> --EXPECT-- -string(52) "Cannot access static:: when no class scope is active" -string(52) "Cannot access parent:: when no class scope is active" -string(50) "Cannot access self:: when no class scope is active" -string(52) "Cannot access static:: when no class scope is active" -string(52) "Cannot access static:: when no class scope is active" -string(52) "Cannot access static:: when no class scope is active" +string(52) "Cannot access "static" when no class scope is active" +string(52) "Cannot access "parent" when no class scope is active" +string(50) "Cannot access "self" when no class scope is active" +string(52) "Cannot access "static" when no class scope is active" +string(52) "Cannot access "static" when no class scope is active" +string(52) "Cannot access "static" when no class scope is active" diff --git a/Zend/tests/bug72101.phpt b/Zend/tests/bug72101.phpt index 04252a43a1546..30d7820dc2291 100644 --- a/Zend/tests/bug72101.phpt +++ b/Zend/tests/bug72101.phpt @@ -74,7 +74,7 @@ $OuterMatcher->stub = new PHPUnit_Framework_MockObject_Stub_ReturnCallback([$foo $a = $b = $c = 0; $foo->bar($a, $b, $c); --EXPECTF-- -Fatal error: Uncaught Error: Class 'DoesNotExists' not found in %sbug72101.php:61 +Fatal error: Uncaught Error: Class "DoesNotExists" not found in %s:%d Stack trace: #0 %sbug72101.php(8): {closure}(2, 'MethodCallbackB...', '%s', 8) #1 %sbug72101.php(27): PHPUnit_Framework_MockObject_Stub_ReturnCallback->invoke(Object(PHPUnit_Framework_MockObject_Invocation_Static)) diff --git a/Zend/tests/bug72943.phpt b/Zend/tests/bug72943.phpt index 8bab6de456482..e815473eb026f 100644 --- a/Zend/tests/bug72943.phpt +++ b/Zend/tests/bug72943.phpt @@ -12,9 +12,9 @@ $a[0] = "t"; var_dump($array[$a]); ?> --EXPECTF-- -Notice: Undefined index: lest in %sbug72943.php on line %d +Notice: Undefined array key "lest" in %s on line %d NULL -Notice: Undefined index: fest in %sbug72943.php on line %d +Notice: Undefined array key "fest" in %s on line %d NULL int(1) diff --git a/Zend/tests/bug73792.phpt b/Zend/tests/bug73792.phpt index 8af16b169b2ec..dfcd9bb499884 100644 --- a/Zend/tests/bug73792.phpt +++ b/Zend/tests/bug73792.phpt @@ -12,7 +12,7 @@ unset($value); echo 'done'; ?> --EXPECTF-- -Warning: Illegal string offset 'bbb' in %sbug73792.php on line 4 +Warning: Illegal string offset "bbb" in %s on line %d Fatal error: Uncaught Error: Cannot iterate on string offsets by reference in %sbug73792.php:4 Stack trace: diff --git a/Zend/tests/bug74546.phpt b/Zend/tests/bug74546.phpt index 2efa790766b03..f2e08c950cf8f 100644 --- a/Zend/tests/bug74546.phpt +++ b/Zend/tests/bug74546.phpt @@ -5,7 +5,7 @@ Bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER()) "000000"[0]::d; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class '0' not found in %sbug74546.php:%d +Fatal error: Uncaught Error: Class "0" not found in %s:%d Stack trace: #0 {main} thrown in %sbug74546.php on line %d diff --git a/Zend/tests/bug74657.phpt b/Zend/tests/bug74657.phpt index fb9b3d6a4d83b..055501066b9f2 100644 --- a/Zend/tests/bug74657.phpt +++ b/Zend/tests/bug74657.phpt @@ -19,7 +19,7 @@ try { var_dump((new C)->options); ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php:%d +Fatal error: Uncaught Error: Undefined constant I::FOO in %s:%d Stack trace: #0 {main} thrown in %sbug74657.php on line %d diff --git a/Zend/tests/bug74836.phpt b/Zend/tests/bug74836.phpt index 7281a07e0eda6..1301a605672a8 100644 --- a/Zend/tests/bug74836.phpt +++ b/Zend/tests/bug74836.phpt @@ -24,10 +24,10 @@ bool(true) string(2) "42" bool(true) -Notice: Undefined index: 010 in %s on line %d +Notice: Undefined array key "010" in %s on line %d NULL bool(false) -Notice: Undefined index: 010 in %s on line %d +Notice: Undefined array key "010" in %s on line %d NULL bool(false) diff --git a/Zend/tests/bug75241.phpt b/Zend/tests/bug75241.phpt index 832ca4402494a..334c30b6ffa19 100644 --- a/Zend/tests/bug75241.phpt +++ b/Zend/tests/bug75241.phpt @@ -7,7 +7,7 @@ $d->d = &$d + $d->d/=0; var_dump($d); ?> --EXPECTF-- -Fatal error: Uncaught Error: Attempt to modify property 'd' on null in %s:%d +Fatal error: Uncaught Error: Attempt to modify property "d" on null in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug75921.phpt b/Zend/tests/bug75921.phpt index cb016b7844320..ab82c85840c43 100644 --- a/Zend/tests/bug75921.phpt +++ b/Zend/tests/bug75921.phpt @@ -45,23 +45,23 @@ unset($null); ?> --EXPECTF-- -Attempt to assign property 'a' on null +Attempt to assign property "a" on null Warning: Undefined variable $null in %s on line %d NULL -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $null in %s on line %d NULL -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $null in %s on line %d NULL -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $null in %s on line %d NULL -Attempt to modify property 'a' on null +Attempt to modify property "a" on null Warning: Undefined variable $null in %s on line %d NULL diff --git a/Zend/tests/bug76534.phpt b/Zend/tests/bug76534.phpt index 17d1550562905..b0149e47a4223 100644 --- a/Zend/tests/bug76534.phpt +++ b/Zend/tests/bug76534.phpt @@ -10,7 +10,7 @@ $x = "foo"; $y = &$x["bar"]; ?> --EXPECTF-- -Fatal error: Uncaught Exception: Illegal string offset 'bar' in %sbug76534.php:%d +Fatal error: Uncaught Exception: Illegal string offset "bar" in %s:%d Stack trace: #0 %sbug76534.php(%d): {closure}(2, 'Illegal string ...', '%s', %d) #1 {main} diff --git a/Zend/tests/bug76667.phpt b/Zend/tests/bug76667.phpt index 73d12de525a4a..cc5abb437262f 100644 --- a/Zend/tests/bug76667.phpt +++ b/Zend/tests/bug76667.phpt @@ -21,18 +21,18 @@ $x->x = 1; --EXPECTF-- Warning: Undefined variable $undefined in %s on line %d -Warning: Attempt to read property '1' on null in %s on line %d +Warning: Attempt to read property "1" on null in %s on line %d Warning: Division by zero in %s on line %d Warning: Undefined variable $undefined in %s on line %d -Warning: Attempt to read property 'NAN' on null in %s on line %d +Warning: Attempt to read property "NAN" on null in %s on line %d Warning: Division by zero in %s on line %d Warning: Undefined variable $undefined in %s on line %d -Warning: Attempt to read property 'NAN' on null in %s on line %d +Warning: Attempt to read property "NAN" on null in %s on line %d Warning: Division by zero in %s on line %d diff --git a/Zend/tests/bug76869.phpt b/Zend/tests/bug76869.phpt index 825bed0eb1b90..a19d2dfedbfe4 100644 --- a/Zend/tests/bug76869.phpt +++ b/Zend/tests/bug76869.phpt @@ -20,4 +20,4 @@ try { } ?> --EXPECT-- -Exception: Call to protected method B::f() from context '' +Exception: Call to protected method B::f() from global scope diff --git a/Zend/tests/bug77738.phpt b/Zend/tests/bug77738.phpt index c664a3134404d..a2e5fa06fdb68 100644 --- a/Zend/tests/bug77738.phpt +++ b/Zend/tests/bug77738.phpt @@ -5,7 +5,7 @@ Bug #77738 (Nullptr deref in zend_compile_expr) __COMPILER_HALT_OFFSET__; ; // <- important --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant '__COMPILER_HALT_OFFSET__' in %s:%d +Fatal error: Uncaught Error: Undefined constant "__COMPILER_HALT_OFFSET__" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/bug78182.phpt b/Zend/tests/bug78182.phpt index 1f9a8b853031b..a751e953bbff4 100644 --- a/Zend/tests/bug78182.phpt +++ b/Zend/tests/bug78182.phpt @@ -12,5 +12,5 @@ try { var_dump($var); ?> --EXPECT-- -Attempt to modify property 'prop' on null +Attempt to modify property "prop" on null NULL diff --git a/Zend/tests/bug78344.phpt b/Zend/tests/bug78344.phpt index c1ff5e0b404f7..ea628aaf01756 100644 --- a/Zend/tests/bug78344.phpt +++ b/Zend/tests/bug78344.phpt @@ -17,7 +17,7 @@ class C extends B { ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access protected const A::FOO in %s:%d +Fatal error: Uncaught Error: Cannot access protected constant A::FOO in %s:%d Stack trace: #0 %s(%d): C->method() #1 {main} diff --git a/Zend/tests/bug78531.phpt b/Zend/tests/bug78531.phpt index 9ddcbf3724182..b818afb79a863 100644 --- a/Zend/tests/bug78531.phpt +++ b/Zend/tests/bug78531.phpt @@ -25,13 +25,13 @@ try { ?> --EXPECTF-- Warning: Undefined variable $u1 in %s on line %d -Attempt to assign property 'a' on null +Attempt to assign property "a" on null Warning: Undefined variable $u2 in %s on line %d -Attempt to increment/decrement property 'a' on null +Attempt to increment/decrement property "a" on null Warning: Undefined variable $u3 in %s on line %d -Attempt to increment/decrement property 'a' on null +Attempt to increment/decrement property "a" on null Warning: Undefined variable $u4 in %s on line %d -Attempt to modify property 'a' on null +Attempt to modify property "a" on null diff --git a/Zend/tests/bug78658.phpt b/Zend/tests/bug78658.phpt index 3445b98b09708..30ebe9de803c0 100644 --- a/Zend/tests/bug78658.phpt +++ b/Zend/tests/bug78658.phpt @@ -11,4 +11,4 @@ $c->bindTo(new stdClass, $scope); ?> --EXPECTF-- -Warning: Class 'AAAABBBB' not found in %s on line %d +Warning: Class "AAAABBBB" not found in %s on line %d diff --git a/Zend/tests/bug78926.phpt b/Zend/tests/bug78926.phpt index 5df92bdb5a191..a59692748b2d3 100644 --- a/Zend/tests/bug78926.phpt +++ b/Zend/tests/bug78926.phpt @@ -18,5 +18,5 @@ var_dump(class_exists('B', false)); ?> --EXPECT-- -Class 'A' not found +Class "A" not found bool(false) diff --git a/Zend/tests/bug79599.phpt b/Zend/tests/bug79599.phpt new file mode 100644 index 0000000000000..b333f153a8cb1 --- /dev/null +++ b/Zend/tests/bug79599.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #79599 (coredump in set_error_handler) +--FILE-- +getMessage()); +} +try{ + test2(); +}catch(\Exception $e){ + var_dump($e->getMessage()); +} +?> +--EXPECT-- +string(21) "Undefined variable $b" +string(21) "Undefined variable $c" diff --git a/Zend/tests/bug79793.phpt b/Zend/tests/bug79793.phpt index 9e4e2e20befae..5491a2669ed97 100644 --- a/Zend/tests/bug79793.phpt +++ b/Zend/tests/bug79793.phpt @@ -18,12 +18,12 @@ var_dump($ary); ?> --EXPECT-- -Undefined index: foobar +Undefined array key "foobar" array(1) { ["foobar"]=> int(1) } -Undefined index: foobarbaz +Undefined array key "foobarbaz" array(2) { ["foobar"]=> int(1) diff --git a/Zend/tests/bug79818.phpt b/Zend/tests/bug79818.phpt new file mode 100644 index 0000000000000..721e677b2e439 --- /dev/null +++ b/Zend/tests/bug79818.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #79818: BIND_STATIC frees old variable value too early +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "UNDEFINED" in %s:%d +Stack trace: +#0 %s(%d): test(Object(stdClass)) +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/call_user_func_002.phpt b/Zend/tests/call_user_func_002.phpt index b25d9cbb417d5..4f2d97182e80c 100644 --- a/Zend/tests/call_user_func_002.phpt +++ b/Zend/tests/call_user_func_002.phpt @@ -31,8 +31,8 @@ try { ?> --EXPECTF-- string(3) "foo" -call_user_func(): Argument #1 ($function) must be a valid callback, class 'foo' not found -call_user_func(): Argument #1 ($function) must be a valid callback, class '' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class "foo" not found +call_user_func(): Argument #1 ($function) must be a valid callback, class "" not found Warning: Undefined variable $foo in %s on line %d call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object diff --git a/Zend/tests/call_user_func_007.phpt b/Zend/tests/call_user_func_007.phpt index 4dd7341add7a2..4010ab1f20a69 100644 --- a/Zend/tests/call_user_func_007.phpt +++ b/Zend/tests/call_user_func_007.phpt @@ -11,7 +11,7 @@ var_dump($a); ?> --EXPECTF-- -Notice: Undefined offset: 0 in %s on line %d +Notice: 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 diff --git a/Zend/tests/class_alias_014.phpt b/Zend/tests/class_alias_014.phpt index 7c4bdb9b0478c..d566f986b6f13 100644 --- a/Zend/tests/class_alias_014.phpt +++ b/Zend/tests/class_alias_014.phpt @@ -12,4 +12,4 @@ class_alias('bar', 'baz'); ?> --EXPECTF-- -Warning: Class 'bar' not found in %s on line %d +Warning: Class "bar" not found in %s on line %d diff --git a/Zend/tests/class_alias_016.phpt b/Zend/tests/class_alias_016.phpt index 1d2b6752a4606..59afa6ca2ade0 100644 --- a/Zend/tests/class_alias_016.phpt +++ b/Zend/tests/class_alias_016.phpt @@ -18,7 +18,7 @@ var_dump(new foo); object(foo\bar)#%d (0) { } -Fatal error: Uncaught Error: Class 'foo\foo' not found in %s:%d +Fatal error: Uncaught Error: Class "foo\foo" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_alias_020.phpt b/Zend/tests/class_alias_020.phpt index ba330e4ae576f..665af2a2f79fd 100644 --- a/Zend/tests/class_alias_020.phpt +++ b/Zend/tests/class_alias_020.phpt @@ -30,7 +30,7 @@ object(foo\foo)#1 (0) { object(foo\bar\foo)#2 (0) { } -Fatal error: Uncaught Error: Class 'foo\bar' not found in %s:%d +Fatal error: Uncaught Error: Class "foo\bar" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_constants_001.phpt b/Zend/tests/class_constants_001.phpt index 68b4e289b8602..8cea480a0d140 100644 --- a/Zend/tests/class_constants_001.phpt +++ b/Zend/tests/class_constants_001.phpt @@ -19,7 +19,7 @@ echo "Done\n"; string(6) "string" int(1) -Fatal error: Uncaught Error: Undefined class constant 'test::val3' in %s:%d +Fatal error: Uncaught Error: Undefined constant test::val3 in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/class_constants_002.phpt b/Zend/tests/class_constants_002.phpt index c34b3620e1040..3e51ab89080d4 100644 --- a/Zend/tests/class_constants_002.phpt +++ b/Zend/tests/class_constants_002.phpt @@ -28,7 +28,7 @@ int(1) int(5) int(10) -Fatal error: Uncaught Error: Class 'NoSuchClass' not found in %s:%d +Fatal error: Uncaught Error: Class "NoSuchClass" not found in %s:%d Stack trace: #0 %s(%d): bar() #1 {main} diff --git a/Zend/tests/class_name_as_scalar_error_005.phpt b/Zend/tests/class_name_as_scalar_error_005.phpt index cbfaf108e2907..14444bdae2f8f 100644 --- a/Zend/tests/class_name_as_scalar_error_005.phpt +++ b/Zend/tests/class_name_as_scalar_error_005.phpt @@ -7,7 +7,7 @@ $x = static::class; ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot use "static" when no class scope is active in %s:3 +Fatal error: Uncaught Error: Cannot use "static" in the global scope in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_006.phpt b/Zend/tests/class_name_as_scalar_error_006.phpt index 185e9f6be15b1..38c93cffd2bcc 100644 --- a/Zend/tests/class_name_as_scalar_error_006.phpt +++ b/Zend/tests/class_name_as_scalar_error_006.phpt @@ -7,7 +7,7 @@ $x = parent::class; ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot use "parent" when no class scope is active in %s:3 +Fatal error: Uncaught Error: Cannot use "parent" in the global scope in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/Zend/tests/class_name_as_scalar_error_007.phpt b/Zend/tests/class_name_as_scalar_error_007.phpt index cbaf518ea80d7..a550cdd2b06d3 100644 --- a/Zend/tests/class_name_as_scalar_error_007.phpt +++ b/Zend/tests/class_name_as_scalar_error_007.phpt @@ -16,5 +16,5 @@ try { ?> --EXPECT-- -Cannot use "self" when no class scope is active -Cannot use "self" when no class scope is active +Cannot use "self" in the global scope +Cannot use "self" in the global scope diff --git a/Zend/tests/class_on_constant_evaluated_expression.phpt b/Zend/tests/class_on_constant_evaluated_expression.phpt index de68e9cca116b..c70262c20d7bb 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 value of type int in %s on line %d diff --git a/Zend/tests/class_on_object.phpt b/Zend/tests/class_on_object.phpt index c080946970c37..c316eff3e467d 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 value of type null diff --git a/Zend/tests/closure_033.phpt b/Zend/tests/closure_033.phpt index d86f590682559..720497bd2de1c 100644 --- a/Zend/tests/closure_033.phpt +++ b/Zend/tests/closure_033.phpt @@ -25,7 +25,7 @@ $o->func(); --EXPECTF-- {closure}() -Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d +Fatal error: Uncaught Error: Call to private method Test::func() from global scope in %s:%d Stack trace: #0 {main} thrown in %sclosure_033.php on line %d diff --git a/Zend/tests/closure_040.phpt b/Zend/tests/closure_040.phpt index 9c59e798f75a7..72d2fb95b8900 100644 --- a/Zend/tests/closure_040.phpt +++ b/Zend/tests/closure_040.phpt @@ -31,6 +31,6 @@ $cas->bindTo($a, 'A'); --EXPECTF-- Warning: Array to string conversion in %s on line %d -Warning: Class 'Array' not found in %s on line %d +Warning: Class "Array" not found in %s on line %d Warning: Cannot bind an instance to a static closure in %s on line %d diff --git a/Zend/tests/closures/closure_instantiate.phpt b/Zend/tests/closures/closure_instantiate.phpt index 54d7d804d3564..de3b866cb82e6 100644 --- a/Zend/tests/closures/closure_instantiate.phpt +++ b/Zend/tests/closures/closure_instantiate.phpt @@ -18,4 +18,4 @@ try { ?> --EXPECT-- -ERROR: Instantiation of 'Closure' is not allowed +ERROR: Instantiation of class Closure is not allowed diff --git a/Zend/tests/const_dereference_001.phpt b/Zend/tests/const_dereference_001.phpt index 5fe6e4d4332af..94c32444e6877 100644 --- a/Zend/tests/const_dereference_001.phpt +++ b/Zend/tests/const_dereference_001.phpt @@ -15,7 +15,7 @@ foreach (array(array(1, 2, 3))[0] as $var) { --EXPECTF-- int(4) -Notice: Undefined index: foo in %sconst_dereference_001.php on line %d +Notice: Undefined array key "foo" in %s on line %d NULL int(6) 123 diff --git a/Zend/tests/const_dereference_002.phpt b/Zend/tests/const_dereference_002.phpt index 1320029baa06e..5d3c6e584248b 100644 --- a/Zend/tests/const_dereference_002.phpt +++ b/Zend/tests/const_dereference_002.phpt @@ -11,7 +11,7 @@ var_dump("foobar"["foo"]["bar"]); string(1) "b" string(1) "o" -Warning: Illegal string offset 'foo' in %sconst_dereference_002.php on line %d +Warning: Illegal string offset "foo" in %s on line %d -Warning: Illegal string offset 'bar' in %sconst_dereference_002.php on line %d +Warning: Illegal string offset "bar" in %s on line %d string(1) "f" diff --git a/Zend/tests/const_dereference_003.phpt b/Zend/tests/const_dereference_003.phpt index 810ad14b8e7ed..5d1b3776733e4 100644 --- a/Zend/tests/const_dereference_003.phpt +++ b/Zend/tests/const_dereference_003.phpt @@ -15,7 +15,7 @@ foreach (array([1, 2, 3])[0] as $var) { --EXPECTF-- int(4) -Notice: Undefined index: foo in %sconst_dereference_003.php on line %d +Notice: Undefined array key "foo" in %s on line %d NULL int(6) 123 diff --git a/Zend/tests/constant_expressions_arrays.phpt b/Zend/tests/constant_expressions_arrays.phpt index d087f7928ef2e..b1f254faff564 100644 --- a/Zend/tests/constant_expressions_arrays.phpt +++ b/Zend/tests/constant_expressions_arrays.phpt @@ -32,7 +32,7 @@ int(1) int(4) int(1) -Notice: Undefined offset: 3 in %s on line %d +Notice: Undefined array key 3 in %s on line %d array(3) { [0]=> int(1) diff --git a/Zend/tests/constant_expressions_self_referencing_array.phpt b/Zend/tests/constant_expressions_self_referencing_array.phpt index daa7250641832..214862071d74a 100644 --- a/Zend/tests/constant_expressions_self_referencing_array.phpt +++ b/Zend/tests/constant_expressions_self_referencing_array.phpt @@ -9,7 +9,7 @@ class A { var_dump(A::FOO); ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR' in %s:%d +Fatal error: Uncaught Error: Cannot declare self-referencing constant self::BAR in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/constants_002.phpt b/Zend/tests/constants_002.phpt index ddb2e67307c07..345c1dd822ffb 100644 --- a/Zend/tests/constants_002.phpt +++ b/Zend/tests/constants_002.phpt @@ -16,5 +16,5 @@ var_dump(foo); ?> --EXPECTF-- Warning: Constants may only evaluate to scalar values, arrays or resources in %s on line %d -Undefined constant 'foo' +Undefined constant "foo" resource(5) of type (stream) diff --git a/Zend/tests/dereference_001.phpt b/Zend/tests/dereference_001.phpt index 048196012fbc7..a3f3eb9310384 100644 --- a/Zend/tests/dereference_001.phpt +++ b/Zend/tests/dereference_001.phpt @@ -12,7 +12,7 @@ var_dump(a()[1][0]); // int(5) function b() { return array(); } -var_dump(b()[0]); // Notice: Undefined offset: 0 +var_dump(b()[0]); // Notice: Undefined array key 0 class foo { public $y = 1; @@ -44,7 +44,7 @@ var_dump(e()['b']); // string(3) "bar" --EXPECTF-- int(5) -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d NULL int(1) string(1) "b" diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt index e196b91e67813..1a7ad253944cd 100644 --- a/Zend/tests/dereference_002.phpt +++ b/Zend/tests/dereference_002.phpt @@ -73,10 +73,10 @@ int(1) Warning: Trying to access array offset on value of type int in %s on line %d NULL -Notice: Undefined offset: 4 in %s on line %d +Notice: Undefined array key 4 in %s on line %d NULL -Notice: Undefined offset: 3 in %s on line %d +Notice: Undefined array key 3 in %s on line %d Fatal error: Uncaught Error: Call to a member function bar() on null in %s:%d Stack trace: diff --git a/Zend/tests/dereference_013.phpt b/Zend/tests/dereference_013.phpt index f3a2e9c6f18e6..756919f8e6643 100644 --- a/Zend/tests/dereference_013.phpt +++ b/Zend/tests/dereference_013.phpt @@ -34,5 +34,5 @@ array(1) { int(1) } -Notice: Undefined offset: %d in %s on line %d +Notice: Undefined array key 2 in %s on line %d NULL diff --git a/Zend/tests/dereference_014.phpt b/Zend/tests/dereference_014.phpt index 7b115cf48a076..35affdf3caeed 100644 --- a/Zend/tests/dereference_014.phpt +++ b/Zend/tests/dereference_014.phpt @@ -29,10 +29,10 @@ var_dump($h); --EXPECTF-- Warning: Trying to access array offset on value of type null in %s on line %d -Warning: Attempt to read property 'a' 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: Attempt to read property 'b' 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/exception_013.phpt b/Zend/tests/exception_013.phpt index 4f5d07c7cfe31..93d85761764b7 100644 --- a/Zend/tests/exception_013.phpt +++ b/Zend/tests/exception_013.phpt @@ -27,13 +27,13 @@ try { var_dump(C::$a); ?> --EXPECTF-- -Exception: Access to undeclared static property: C::$a in %sexception_013.php on line 7 +Exception: Access to undeclared static property C::$a in %s on line %d Exception: Cannot access private property C::$p in %sexception_013.php on line 13 Exception: Attempt to unset static property C::$a in %sexception_013.php on line 19 -Fatal error: Uncaught Error: Access to undeclared static property: C::$a in %sexception_013.php:24 +Fatal error: Uncaught Error: Access to undeclared static property C::$a in %s:%d Stack trace: #0 {main} thrown in %sexception_013.php on line 24 diff --git a/Zend/tests/exception_handler_004.phpt b/Zend/tests/exception_handler_004.phpt index f07970d3377f7..9b2ae6933ac0c 100644 --- a/Zend/tests/exception_handler_004.phpt +++ b/Zend/tests/exception_handler_004.phpt @@ -16,5 +16,5 @@ try { ?> --EXPECT-- -set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback -set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback +set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, function "fo" not found or invalid function name +set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, class "" not found diff --git a/Zend/tests/exception_handler_007.phpt b/Zend/tests/exception_handler_007.phpt new file mode 100644 index 0000000000000..757154dde51cf --- /dev/null +++ b/Zend/tests/exception_handler_007.phpt @@ -0,0 +1,26 @@ +--TEST-- +exception handler tests - 7 +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught Exception in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/generators/bug63066.phpt b/Zend/tests/generators/bug63066.phpt index df62fcebe2d58..26ad4e5fcbb22 100644 --- a/Zend/tests/generators/bug63066.phpt +++ b/Zend/tests/generators/bug63066.phpt @@ -13,7 +13,7 @@ foreach(gen(new stdClass()) as $value) --EXPECTF-- foo -Fatal error: Uncaught Error: Call to undefined method stdClass::fatalError() in %sbug63066.php:5 +Fatal error: Uncaught Error: Call to undefined method stdClass::fatalError() in %s:%d Stack trace: #0 %s(%d): gen(Object(stdClass)) #1 {main} diff --git a/Zend/tests/globals_001.phpt b/Zend/tests/globals_001.phpt index 6e8caccc91e03..e71711f75c974 100644 --- a/Zend/tests/globals_001.phpt +++ b/Zend/tests/globals_001.phpt @@ -26,7 +26,7 @@ string(5) "array" int(%d) string(%d) "%s" -Notice: Undefined index: PHP_SELF in %s on line %d +Notice: Undefined array key "PHP_SELF" in %s on line %d NULL Warning: Undefined variable $_SERVER in %s on line %d diff --git a/Zend/tests/globals_002.phpt b/Zend/tests/globals_002.phpt index d62ff83631f2f..9b59bf09752ce 100644 --- a/Zend/tests/globals_002.phpt +++ b/Zend/tests/globals_002.phpt @@ -29,7 +29,7 @@ string(5) "array" int(%d) string(%d) "%s" -Notice: Undefined index: PHP_SELF in %s on line %d +Notice: Undefined array key "PHP_SELF" in %s on line %d NULL Warning: Undefined variable $_SERVER in %s on line %d diff --git a/Zend/tests/globals_003.phpt b/Zend/tests/globals_003.phpt index bc0c742a33fac..924b92bebc4bf 100644 --- a/Zend/tests/globals_003.phpt +++ b/Zend/tests/globals_003.phpt @@ -35,7 +35,7 @@ string(5) "array" int(%d) string(%d) "%s" -Notice: Undefined index: PHP_SELF in %s on line %d +Notice: Undefined array key "PHP_SELF" in %s on line %d NULL Warning: Undefined variable $_SERVER in %s on line %d diff --git a/Zend/tests/globals_004.phpt b/Zend/tests/globals_004.phpt index 7121bb3297a75..bc3850938cdb4 100644 --- a/Zend/tests/globals_004.phpt +++ b/Zend/tests/globals_004.phpt @@ -20,7 +20,7 @@ string(5) "array" int(%d) string(%d) "%s" -Notice: Undefined index: PHP_SELF in %s on line %d +Notice: Undefined array key "PHP_SELF" in %s on line %d NULL Warning: Undefined variable $_SERVER in %s on line %d diff --git a/Zend/tests/grandparent_prototype.phpt b/Zend/tests/grandparent_prototype.phpt index 872969654ded2..39d66f46f028f 100644 --- a/Zend/tests/grandparent_prototype.phpt +++ b/Zend/tests/grandparent_prototype.phpt @@ -8,7 +8,7 @@ class A { } class B extends A { public function test2($x) { - $x->test(); // Uncaught Error: Call to protected method D::test() from context 'B' + $x->test(); // Uncaught Error: Call to protected method D::test() from scope B } } class C extends A { diff --git a/Zend/tests/halt_compiler5.phpt b/Zend/tests/halt_compiler5.phpt index 51167b6c3b1e3..8f0364a944111 100644 --- a/Zend/tests/halt_compiler5.phpt +++ b/Zend/tests/halt_compiler5.phpt @@ -5,7 +5,7 @@ Using __COMPILER_HALF_OFFSET__ with trailing {} (OSS-Fuzz #17895) __COMPILER_HALT_OFFSET__; {} --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant '__COMPILER_HALT_OFFSET__' in %s:%d +Fatal error: Uncaught Error: Undefined constant "__COMPILER_HALT_OFFSET__" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indexing_001.phpt b/Zend/tests/indexing_001.phpt index 5a5fbef054631..156df07f0c8f9 100644 --- a/Zend/tests/indexing_001.phpt +++ b/Zend/tests/indexing_001.phpt @@ -75,14 +75,14 @@ array(1) { } } -Warning: Illegal string offset 'foo' in %s on line %d +Warning: Illegal string offset "foo" in %s on line %d Warning: Array to string conversion in %s on line %d Warning: Only the first byte will be assigned to the string offset in %s on line %d string(1) "A" -Warning: Illegal string offset 'foo' in %s on line %d +Warning: Illegal string offset "foo" in %s on line %d Warning: Array to string conversion in %s on line %d diff --git a/Zend/tests/indirect_call_array_001.phpt b/Zend/tests/indirect_call_array_001.phpt index d76837c8eb90f..4f669781aac8e 100644 --- a/Zend/tests/indirect_call_array_001.phpt +++ b/Zend/tests/indirect_call_array_001.phpt @@ -8,7 +8,7 @@ $arr(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'a' not found in %s:%d +Fatal error: Uncaught Error: Class "a" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/indirect_call_string_002.phpt b/Zend/tests/indirect_call_string_002.phpt index ecb0b6d80ff94..7704c1cd9a4d7 100644 --- a/Zend/tests/indirect_call_string_002.phpt +++ b/Zend/tests/indirect_call_string_002.phpt @@ -77,10 +77,10 @@ try { --EXPECT-- string(0) "" string(0) "" -Class '' not found -Class '' not found -Class '' not found -Class '' not found +Class "" not found +Class "" not found +Class "" not found +Class "" not found Call to undefined function Class:() Call to undefined function :method() Call to undefined function :() diff --git a/Zend/tests/int_static_prop_name.phpt b/Zend/tests/int_static_prop_name.phpt index cb47bb6d0a830..e29e2514bb97b 100644 --- a/Zend/tests/int_static_prop_name.phpt +++ b/Zend/tests/int_static_prop_name.phpt @@ -37,6 +37,6 @@ try { int(24) int(24) int(24) -Access to undeclared static property: Foo::$42 -Access to undeclared static property: Foo::$42 -Access to undeclared static property: Foo::$42 +Access to undeclared static property Foo::$42 +Access to undeclared static property Foo::$42 +Access to undeclared static property Foo::$42 diff --git a/Zend/tests/invalid_parent_const_ref_leak.phpt b/Zend/tests/invalid_parent_const_ref_leak.phpt index 33e2548f315c6..ed728f7d45e47 100644 --- a/Zend/tests/invalid_parent_const_ref_leak.phpt +++ b/Zend/tests/invalid_parent_const_ref_leak.phpt @@ -15,4 +15,4 @@ try { ?> --EXPECT-- -Cannot access parent:: when current class scope has no parent +Cannot access "parent" when current class scope has no parent diff --git a/Zend/tests/isset_003.phpt b/Zend/tests/isset_003.phpt index 4812d8e394df4..6979a847af74d 100644 --- a/Zend/tests/isset_003.phpt +++ b/Zend/tests/isset_003.phpt @@ -35,7 +35,7 @@ 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: Attempt to read property '' on string in %s on line %d +Warning: Attempt to read property "" on string in %s on line %d bool(false) bool(true) bool(false) diff --git a/Zend/tests/list/list_reference_006.phpt b/Zend/tests/list/list_reference_006.phpt index f85edf04a49ad..3ada70ed6736f 100644 --- a/Zend/tests/list/list_reference_006.phpt +++ b/Zend/tests/list/list_reference_006.phpt @@ -35,7 +35,7 @@ object(StorageNoRef)#1 (1) { } } -Notice: Undefined offset: 2 in %s on line %d +Notice: Undefined array key 2 in %s on line %d object(StorageNoRef)#2 (1) { ["s":"StorageNoRef":private]=> array(2) { diff --git a/Zend/tests/list_006.phpt b/Zend/tests/list_006.phpt index d380235d257a0..d5a0eecc9f864 100644 --- a/Zend/tests/list_006.phpt +++ b/Zend/tests/list_006.phpt @@ -7,6 +7,6 @@ list($a, list($b, list(list($d)))) = array(); ?> --EXPECTF-- -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d -Notice: Undefined offset: 1 in %s on line %d +Notice: Undefined array key 1 in %s on line %d diff --git a/Zend/tests/list_keyed_conversions.phpt b/Zend/tests/list_keyed_conversions.phpt index 1dd48de9f2ac5..04dad324d9a2f 100644 --- a/Zend/tests/list_keyed_conversions.phpt +++ b/Zend/tests/list_keyed_conversions.phpt @@ -31,4 +31,4 @@ int(1) Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d -Notice: Undefined offset: 1 in %s on line %d +Notice: Undefined array key 1 in %s on line %d diff --git a/Zend/tests/list_keyed_undefined.phpt b/Zend/tests/list_keyed_undefined.phpt index 3d1939c5ac499..fe1e86389a0cf 100644 --- a/Zend/tests/list_keyed_undefined.phpt +++ b/Zend/tests/list_keyed_undefined.phpt @@ -14,8 +14,8 @@ var_dump($five, $duke); ?> --EXPECTF-- -Notice: Undefined offset: 5 in %s on line %d +Notice: Undefined array key 5 in %s on line %d -Notice: Undefined index: duke in %s on line %d +Notice: Undefined array key "duke" in %s on line %d NULL NULL diff --git a/Zend/tests/match/001.phpt b/Zend/tests/match/001.phpt new file mode 100644 index 0000000000000..9d338c1b423a2 --- /dev/null +++ b/Zend/tests/match/001.phpt @@ -0,0 +1,36 @@ +--TEST-- +Basic match expression functionality test +--FILE-- + 'Zero', + 1 => 'One', + 2 => 'Two', + 3 => 'Three', + 4 => 'Four', + 5 => 'Five', + 6 => 'Six', + 7 => 'Seven', + 8 => 'Eight', + 9 => 'Nine', + }; +} + +for ($i = 0; $i <= 9; $i++) { + print wordify($i) . "\n"; +} + +?> +--EXPECT-- +Zero +One +Two +Three +Four +Five +Six +Seven +Eight +Nine diff --git a/Zend/tests/match/002.phpt b/Zend/tests/match/002.phpt new file mode 100644 index 0000000000000..ad087c59265d2 --- /dev/null +++ b/Zend/tests/match/002.phpt @@ -0,0 +1,19 @@ +--TEST-- +Match expression omit trailing comma +--FILE-- + "true\n", + false => "false\n" + }; +} + +print_bool(true); +print_bool(false); + +?> +--EXPECT-- +true +false diff --git a/Zend/tests/match/003.phpt b/Zend/tests/match/003.phpt new file mode 100644 index 0000000000000..550d2277d615b --- /dev/null +++ b/Zend/tests/match/003.phpt @@ -0,0 +1,24 @@ +--TEST-- +Match expression default case +--FILE-- + 1, + 2 => 2, + default => 'default', + }; +} + +echo get_value(0) . "\n"; +echo get_value(1) . "\n"; +echo get_value(2) . "\n"; +echo get_value(3) . "\n"; + +?> +--EXPECT-- +default +1 +2 +default diff --git a/Zend/tests/match/004.phpt b/Zend/tests/match/004.phpt new file mode 100644 index 0000000000000..2f8717f74ea05 --- /dev/null +++ b/Zend/tests/match/004.phpt @@ -0,0 +1,31 @@ +--TEST-- +Match expression with true as expression +--FILE-- += 50 => '50+', + $i >= 40 => '40-50', + $i >= 30 => '30-40', + $i >= 20 => '20-30', + $i >= 10 => '10-20', + default => '0-10', + }; +} + +echo get_range(22) . "\n"; +echo get_range(0) . "\n"; +echo get_range(59) . "\n"; +echo get_range(13) . "\n"; +echo get_range(39) . "\n"; +echo get_range(40) . "\n"; + +?> +--EXPECT-- +20-30 +0-10 +50+ +10-20 +30-40 +40-50 diff --git a/Zend/tests/match/005.phpt b/Zend/tests/match/005.phpt new file mode 100644 index 0000000000000..cc72739f432bf --- /dev/null +++ b/Zend/tests/match/005.phpt @@ -0,0 +1,12 @@ +--TEST-- +Match expression discarding result +--FILE-- + print "Executed\n", +}; + +?> +--EXPECT-- +Executed diff --git a/Zend/tests/match/006.phpt b/Zend/tests/match/006.phpt new file mode 100644 index 0000000000000..fec28f82da631 --- /dev/null +++ b/Zend/tests/match/006.phpt @@ -0,0 +1,13 @@ +--TEST-- +Match expression with no cases +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught UnhandledMatchError: Unhandled match value of type bool in %s +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/match/007.phpt b/Zend/tests/match/007.phpt new file mode 100644 index 0000000000000..7b442a66a03e5 --- /dev/null +++ b/Zend/tests/match/007.phpt @@ -0,0 +1,26 @@ +--TEST-- +Match expression exception on unhandled case +--FILE-- + 1, + 2 => 2, + }; +} + +echo get_value(1) . "\n"; +echo get_value(2) . "\n"; +echo get_value(3) . "\n"; + +?> +--EXPECTF-- +1 +2 + +Fatal error: Uncaught UnhandledMatchError: Unhandled match value of type int in %s +Stack trace: +#0 %s: get_value(3) +#1 {main} + thrown in %s on line %d diff --git a/Zend/tests/match/008.phpt b/Zend/tests/match/008.phpt new file mode 100644 index 0000000000000..db91d80b87110 --- /dev/null +++ b/Zend/tests/match/008.phpt @@ -0,0 +1,25 @@ +--TEST-- +Match expression multiple conditions per case +--FILE-- + false, + 2, 3, 4, 5, 6 => true, + }; +} + +for ($i = 1; $i <= 7; $i++) { + var_dump(is_working_day($i)); +} + +?> +--EXPECT-- +bool(false) +bool(true) +bool(true) +bool(true) +bool(true) +bool(true) +bool(false) diff --git a/Zend/tests/match/009.phpt b/Zend/tests/match/009.phpt new file mode 100644 index 0000000000000..32153e745342b --- /dev/null +++ b/Zend/tests/match/009.phpt @@ -0,0 +1,22 @@ +--TEST-- +Pretty printing for match expression +--FILE-- + false, + 'baz' => 'a', + default => 'b', + }; +})()); + +?> +--EXPECTF-- +Warning: assert(): assert(function () { + match ('foo') { + 'foo', 'bar' => false, + 'baz' => 'a', + default => 'b', + }; +}()) failed in %s on line %d diff --git a/Zend/tests/match/011.phpt b/Zend/tests/match/011.phpt new file mode 100644 index 0000000000000..1c3c139ef7255 --- /dev/null +++ b/Zend/tests/match/011.phpt @@ -0,0 +1,19 @@ +--TEST-- +Implicit break in match expression +--FILE-- + dump_and_return('foo'), + 'bar' => dump_and_return('bar'), +}); + +?> +--EXPECT-- +string(3) "foo" +string(3) "foo" diff --git a/Zend/tests/match/012.phpt b/Zend/tests/match/012.phpt new file mode 100644 index 0000000000000..c75fc73de87ad --- /dev/null +++ b/Zend/tests/match/012.phpt @@ -0,0 +1,36 @@ +--TEST-- +Strict comparison in match expression +--FILE-- + wrong(), + false => wrong(), + 0.0 => wrong(), + [] => wrong(), + '' => wrong(), + 0 => 'int', +}); + +function get_value() { + return 0; +} + +var_dump(match (get_value()) { + null => wrong(), + false => wrong(), + 0.0 => wrong(), + [] => wrong(), + '' => wrong(), + 0 => 'int', + default => 'default', +}); + +?> +--EXPECT-- +string(3) "int" +string(3) "int" diff --git a/Zend/tests/match/017.phpt b/Zend/tests/match/017.phpt new file mode 100644 index 0000000000000..17f07a0b13e9f --- /dev/null +++ b/Zend/tests/match/017.phpt @@ -0,0 +1,93 @@ +--TEST-- +Test strict comparison with match expression jump table +--FILE-- + wrong(), + 1 => wrong(), + 2 => wrong(), + 3 => wrong(), + 4 => wrong(), + 5 => wrong(), + 6 => wrong(), + 7 => wrong(), + 8 => wrong(), + 9 => wrong(), + default => 'Not matched', + }; +} + +foreach (range(0, 9) as $int) { + var_dump((string) $int); + var_dump(test_int((string) $int)); +} + +function test_string($int) { + return match ($int) { + '0' => wrong(), + '1' => wrong(), + '2' => wrong(), + '3' => wrong(), + '4' => wrong(), + '5' => wrong(), + '6' => wrong(), + '7' => wrong(), + '8' => wrong(), + '9' => wrong(), + default => 'Not matched', + }; +} + +foreach (range(0, 9) as $int) { + var_dump($int); + var_dump(test_string($int)); +} + +?> +--EXPECT-- +string(1) "0" +string(11) "Not matched" +string(1) "1" +string(11) "Not matched" +string(1) "2" +string(11) "Not matched" +string(1) "3" +string(11) "Not matched" +string(1) "4" +string(11) "Not matched" +string(1) "5" +string(11) "Not matched" +string(1) "6" +string(11) "Not matched" +string(1) "7" +string(11) "Not matched" +string(1) "8" +string(11) "Not matched" +string(1) "9" +string(11) "Not matched" +int(0) +string(11) "Not matched" +int(1) +string(11) "Not matched" +int(2) +string(11) "Not matched" +int(3) +string(11) "Not matched" +int(4) +string(11) "Not matched" +int(5) +string(11) "Not matched" +int(6) +string(11) "Not matched" +int(7) +string(11) "Not matched" +int(8) +string(11) "Not matched" +int(9) +string(11) "Not matched" diff --git a/Zend/tests/match/023.phpt b/Zend/tests/match/023.phpt new file mode 100644 index 0000000000000..9b16e16a8962d --- /dev/null +++ b/Zend/tests/match/023.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test match strict comparison with true expression +--FILE-- + wrong(), + ['truthy'] => wrong(), + new stdClass() => wrong(), + 1 => wrong(), + 1.0 => wrong(), + true => "true\n", +}; + +?> +--EXPECT-- +true diff --git a/Zend/tests/match/024.phpt b/Zend/tests/match/024.phpt new file mode 100644 index 0000000000000..e1b8e438d6b56 --- /dev/null +++ b/Zend/tests/match/024.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test match strict comparison with false expression +--FILE-- + wrong(), + [] => wrong(), + 0 => wrong(), + 0.0 => wrong(), + false => "false\n", +}; + +?> +--EXPECT-- +false diff --git a/Zend/tests/match/027.phpt b/Zend/tests/match/027.phpt new file mode 100644 index 0000000000000..5b87a2c4ea2bc --- /dev/null +++ b/Zend/tests/match/027.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test result of match cannot be modified by reference +--FILE-- + $i }); + echo "i is $i\n"; + $j = 1; + Test::usesRef(match(true) { true => $j }); + echo "j is $j\n"; +} +main(); + +?> +--EXPECTF-- +usesValue 0 +i is 0 + +Fatal error: Uncaught Error: Cannot pass parameter 1 by reference in %s027.php:20 +Stack trace: +#0 %s027.php(23): main() +#1 {main} + thrown in %s027.php on line 20 diff --git a/Zend/tests/match/028.phpt b/Zend/tests/match/028.phpt new file mode 100644 index 0000000000000..bbc826a73863e --- /dev/null +++ b/Zend/tests/match/028.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test result of match cannot be modified by reference +--FILE-- + $i }); + Test::usesValue(match($i) { 42 => $i }); + var_dump($i); + Test::usesRef(match(true) { true => $i }); + var_dump($i); +} + +try { + main(42); +} catch (Error $e) { + printf("Caught %s\n", $e->getMessage()); +} + +?> +--EXPECT-- +usesValue 42 +usesValue 42 +int(42) +Caught Cannot pass parameter 1 by reference diff --git a/Zend/tests/match/029.phpt b/Zend/tests/match/029.phpt new file mode 100644 index 0000000000000..e4f9d64ea4189 --- /dev/null +++ b/Zend/tests/match/029.phpt @@ -0,0 +1,23 @@ +--TEST-- +Test long match with undefined variable +--FILE-- + "This should not get printed with or without opcache\n", + 1, 2, 3, 4, 5 => "Also should not be printed\n", +}; + +echo "unreachable\n"; + +?> +--EXPECTF-- +Fatal error: Uncaught Exception: Custom error handler: Undefined variable $undefVar in %s029.php:4 +Stack trace: +#0 %s029.php(7): {closure}(%d, 'Undefined varia...', '%s', %d) +#1 {main} + thrown in %s029.php on line 4 diff --git a/Zend/tests/match/030.phpt b/Zend/tests/match/030.phpt new file mode 100644 index 0000000000000..53588600bd7ce --- /dev/null +++ b/Zend/tests/match/030.phpt @@ -0,0 +1,23 @@ +--TEST-- +Test string match with undefined variable +--FILE-- + "This should not get printed with or without opcache\n", + '1', '2', '3', '4', '5' => "Also should not be printed\n", +}; + +echo "unreachable\n"; + +?> +--EXPECTF-- +Fatal error: Uncaught Exception: Custom error handler: Undefined variable $undefVar in %s030.php:4 +Stack trace: +#0 %s030.php(7): {closure}(%d, 'Undefined varia...', '%s', %d) +#1 {main} + thrown in %s030.php on line 4 diff --git a/Zend/tests/match/037.phpt b/Zend/tests/match/037.phpt new file mode 100644 index 0000000000000..abd5dcfdc1855 --- /dev/null +++ b/Zend/tests/match/037.phpt @@ -0,0 +1,69 @@ +--TEST-- +Test match jumptable with only one arm +--FILE-- + 'foo', + }); +} catch (Error $e) { + var_dump((string) $e); +} + +try { + var_dump(match(6) { + 1, 2, 3, 4, 5 => 'foo', + }); +} catch (Error $e) { + var_dump((string) $e); +} + +try { + var_dump(match('3') { + 1, 2, 3, 4, 5 => 'foo', + }); +} catch (Error $e) { + var_dump((string) $e); +} + +var_dump(match(3) { + 1, 2, 3, 4, 5 => 'foo', +}); + +var_dump(match(true) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', +}); + +var_dump(match(6) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', +}); + +var_dump(match('3') { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', +}); + +var_dump(match(3) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', +}); + +?> +--EXPECTF-- +string(%d) "UnhandledMatchError: Unhandled match value of type bool in %s037.php:5 +Stack trace: +#0 {main}" +string(%d) "UnhandledMatchError: Unhandled match value of type int in %s037.php:13 +Stack trace: +#0 {main}" +string(%d) "UnhandledMatchError: Unhandled match value of type string in %s037.php:21 +Stack trace: +#0 {main}" +string(3) "foo" +string(3) "bar" +string(3) "bar" +string(3) "bar" +string(3) "foo" diff --git a/Zend/tests/match/038.phpt b/Zend/tests/match/038.phpt new file mode 100644 index 0000000000000..cc158038a9b19 --- /dev/null +++ b/Zend/tests/match/038.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test multiple default arms in match in different arms +--FILE-- + 'foo', + 1 => 'bar', + 2 => 'baz', + default => 'qux', +}; + +?> +--EXPECTF-- +Fatal error: Match expressions may only contain one default arm in %s on line 7 diff --git a/Zend/tests/match/039.phpt b/Zend/tests/match/039.phpt new file mode 100644 index 0000000000000..d37aed5986fd9 --- /dev/null +++ b/Zend/tests/match/039.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test match with duplicate conditions +--FILE-- + 1, + 2 => 2, + 3 => 3, + 4 => 4, + 5 => 5, + 1 => 6, +}; +echo "\n"; + +echo match ($value) { + 2, 1 => '2, 1', + 1 => 1, + 3 => 3, + 4 => 4, + 5 => 5, +}; +echo "\n"; + +echo match ($value) { + 1, 1 => '1, 1', + 2, 2 => '2, 2', + 3, 3 => '3, 3', + 4, 4 => '4, 4', + 5, 5 => '5, 5', +}; +echo "\n"; + +echo match ($value) { + 1 => 1, + 1 => 2, +}; +echo "\n"; + +echo match ($value) { + 2, 1 => '2, 1', + 1 => 1, +}; +echo "\n"; + +echo match ($value) { + 1, 1 => '1, 1', + 1 => 1, +}; +echo "\n"; + +?> +--EXPECT-- +1 +2, 1 +1, 1 +1 +2, 1 +1, 1 diff --git a/Zend/tests/match/040.phpt b/Zend/tests/match/040.phpt new file mode 100644 index 0000000000000..223c3727ecb89 --- /dev/null +++ b/Zend/tests/match/040.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test match with mixed int/string jumptable +--FILE-- + '1 int', + '1' => '1 string', + 2 => '2 int', + '2' => '2 string', + 3 => '3 int', + '3' => '3 string', + 4 => '4 int', + '4' => '4 string', + 5 => '5 int', + '5' => '5 string', + }; + echo "\n"; +} + +test(1); +test('1'); +test(2); +test('2'); +test(3); +test('3'); +test(4); +test('4'); +test(5); +test('5'); + +?> +--EXPECT-- +1 int +1 string +2 int +2 string +3 int +3 string +4 int +4 string +5 int +5 string diff --git a/Zend/tests/match/041.phpt b/Zend/tests/match/041.phpt new file mode 100644 index 0000000000000..1e22f1d6880b2 --- /dev/null +++ b/Zend/tests/match/041.phpt @@ -0,0 +1,33 @@ +--TEST-- +Match expression with trailing comma in condition list +--FILE-- + "false\n", + true, + 1, + => "true\n", + default, + => "not bool\n", + }; +} + +print_bool(false); +print_bool(0); +print_bool(true); +print_bool(1); +print_bool(2); +print_bool('foo'); + +?> +--EXPECT-- +false +false +true +true +not bool +not bool diff --git a/Zend/tests/match/042.phpt b/Zend/tests/match/042.phpt new file mode 100644 index 0000000000000..6ea30dd3764ce --- /dev/null +++ b/Zend/tests/match/042.phpt @@ -0,0 +1,22 @@ +--TEST-- +Match expression with undefined variable as expression +--FILE-- + 'null', + default => 'default', +}); + +var_dump(match ($undefinedVariable) { + 1, 2, 3, 4, 5 => 'foo', + default => 'bar', +}); + +?> +--EXPECTF-- +Warning: Undefined variable $undefinedVariable in %s.php on line 3 +string(4) "null" + +Warning: Undefined variable $undefinedVariable in %s.php on line 8 +string(3) "bar" diff --git a/Zend/tests/ns_004.phpt b/Zend/tests/ns_004.phpt index f04f662e0ab4f..2acc7622dec3c 100644 --- a/Zend/tests/ns_004.phpt +++ b/Zend/tests/ns_004.phpt @@ -6,7 +6,7 @@ namespace test\ns1; echo get_class(new Exception()),"\n"; --EXPECTF-- -Fatal error: Uncaught Error: Class 'test\ns1\Exception' not found in %sns_004.php:%d +Fatal error: Uncaught Error: Class "test\ns1\Exception" not found in %s:%d Stack trace: #0 {main} thrown in %sns_004.php on line %d diff --git a/Zend/tests/ns_038.phpt b/Zend/tests/ns_038.phpt index f514de77c9ceb..1cf824b4cb087 100644 --- a/Zend/tests/ns_038.phpt +++ b/Zend/tests/ns_038.phpt @@ -11,7 +11,7 @@ function foo() { --EXPECTF-- ok -Fatal error: Uncaught Error: Call to undefined method Exception::bar() in %sns_038.php:7 +Fatal error: Uncaught Error: Call to undefined method Exception::bar() in %s:%d Stack trace: #0 {main} thrown in %sns_038.php on line 7 diff --git a/Zend/tests/ns_041.phpt b/Zend/tests/ns_041.phpt index 3a2fe7758b3c6..09398ec35c586 100644 --- a/Zend/tests/ns_041.phpt +++ b/Zend/tests/ns_041.phpt @@ -17,7 +17,7 @@ ok ok ok -Fatal error: Uncaught Error: Undefined constant 'test\ns1\BAR' in %s:%d +Fatal error: Uncaught Error: Undefined constant "test\ns1\BAR" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/ns_057.phpt b/Zend/tests/ns_057.phpt index ad44d09d28231..257bbedb3e060 100644 --- a/Zend/tests/ns_057.phpt +++ b/Zend/tests/ns_057.phpt @@ -56,7 +56,7 @@ const ok class ok ok -Fatal error: Uncaught Error: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d +Fatal error: Uncaught Error: Undefined constant "Test\ns1\unknown" in %s:%d Stack trace: #0 {main} thrown in %sns_057.php on line %d diff --git a/Zend/tests/ns_058.phpt b/Zend/tests/ns_058.phpt index 6672d8a0b09da..0c0b19760d2d5 100644 --- a/Zend/tests/ns_058.phpt +++ b/Zend/tests/ns_058.phpt @@ -54,7 +54,7 @@ const ok class ok ok -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_058.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 {main} thrown in %sns_058.php on line %d diff --git a/Zend/tests/ns_076.phpt b/Zend/tests/ns_076.phpt index 0db8aeba624e0..230b498b54acd 100644 --- a/Zend/tests/ns_076.phpt +++ b/Zend/tests/ns_076.phpt @@ -25,6 +25,6 @@ try { ?> --EXPECT-- -Undefined constant 'foo\unknown' -Undefined constant 'foo\unknown' -Undefined constant 'unknown' +Undefined constant "foo\unknown" +Undefined constant "foo\unknown" +Undefined constant "unknown" diff --git a/Zend/tests/ns_077_1.phpt b/Zend/tests/ns_077_1.phpt index b59f8172eaa52..7d4b6753bf798 100644 --- a/Zend/tests/ns_077_1.phpt +++ b/Zend/tests/ns_077_1.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_2.phpt b/Zend/tests/ns_077_2.phpt index d51350c56a98b..42222b72951f4 100644 --- a/Zend/tests/ns_077_2.phpt +++ b/Zend/tests/ns_077_2.phpt @@ -10,7 +10,7 @@ function foo($a = array(\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_3.phpt b/Zend/tests/ns_077_3.phpt index 0e90195c0578b..9abaa13c04f9d 100644 --- a/Zend/tests/ns_077_3.phpt +++ b/Zend/tests/ns_077_3.phpt @@ -10,7 +10,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "foo\unknown" in %s:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_4.phpt b/Zend/tests/ns_077_4.phpt index 72c3233a63e1e..00ad71c98865f 100644 --- a/Zend/tests/ns_077_4.phpt +++ b/Zend/tests/ns_077_4.phpt @@ -10,7 +10,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'foo\unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "foo\unknown" in %s:%d Stack trace: #0 %s(%d): foo\foo() #1 {main} diff --git a/Zend/tests/ns_077_5.phpt b/Zend/tests/ns_077_5.phpt index 05235442e5639..ed6e0087a8d81 100644 --- a/Zend/tests/ns_077_5.phpt +++ b/Zend/tests/ns_077_5.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => \unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_7.phpt b/Zend/tests/ns_077_7.phpt index 166bf31cc724e..84f06565f2e57 100644 --- a/Zend/tests/ns_077_7.phpt +++ b/Zend/tests/ns_077_7.phpt @@ -9,7 +9,7 @@ function foo($a = array(0 => namespace\unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/ns_077_8.phpt b/Zend/tests/ns_077_8.phpt index e081842460dd3..f4f38739a39c6 100644 --- a/Zend/tests/ns_077_8.phpt +++ b/Zend/tests/ns_077_8.phpt @@ -9,7 +9,7 @@ function foo($a = array(namespace\unknown => unknown)) foo(); --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d +Fatal error: Uncaught Error: Undefined constant "unknown" in %s:%d Stack trace: #0 %s(%d): foo() #1 {main} diff --git a/Zend/tests/objects_029.phpt b/Zend/tests/objects_029.phpt index b5f063625e269..d18e4a8351cfd 100644 --- a/Zend/tests/objects_029.phpt +++ b/Zend/tests/objects_029.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: foo::$f in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property foo::$f in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/objects_030.phpt b/Zend/tests/objects_030.phpt index 55ac88f8869f5..8f9c993da3dd4 100644 --- a/Zend/tests/objects_030.phpt +++ b/Zend/tests/objects_030.phpt @@ -23,7 +23,7 @@ new foo; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: bar::$f in %s:%d +Fatal error: Uncaught Error: Access to undeclared static property bar::$f in %s:%d Stack trace: #0 %s(%d): foo->__construct() #1 {main} diff --git a/Zend/tests/offset_array.phpt b/Zend/tests/offset_array.phpt index 97b6a06b1c32e..24a3d55d3c496 100644 --- a/Zend/tests/offset_array.phpt +++ b/Zend/tests/offset_array.phpt @@ -36,10 +36,10 @@ echo "Done\n"; int(2) int(1) -Notice: Undefined index: in %s on line %d +Notice: Undefined array key "" in %s on line %d NULL -Notice: Undefined index: run away in %s on line %d +Notice: Undefined array key "run away" in %s on line %d NULL int(2) int(1) diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt index 04a4f41e6c708..d4c56b30c8b44 100644 --- a/Zend/tests/offset_assign.phpt +++ b/Zend/tests/offset_assign.phpt @@ -8,7 +8,7 @@ $x['x']['y'] += 1; echo "Done\n"; ?> --EXPECTF-- -Warning: Illegal string offset 'x' in %soffset_assign.php on line %d +Warning: Illegal string offset "x" in %s on line %d Fatal error: Uncaught Error: Cannot use string offset as an array in %soffset_assign.php:%d Stack trace: diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt index 1a9667cb8fbcb..4c7debcaa9bb5 100644 --- a/Zend/tests/offset_string.phpt +++ b/Zend/tests/offset_string.phpt @@ -48,11 +48,11 @@ string(1) "S" Warning: String offset cast occurred in %s on line %d string(1) "S" -Warning: Illegal string offset 'run away' in %s on line %d +Warning: Illegal string offset "run away" in %s on line %d string(1) "S" string(1) "c" -Warning: Illegal string offset '14.5' in %s on line %d +Warning: Illegal string offset "14.5" in %s on line %d string(1) "o" Notice: A non well formed numeric value encountered in %s on line %d diff --git a/Zend/tests/result_unused.phpt b/Zend/tests/result_unused.phpt index 95ae7a5a15db6..e6bb9be771711 100644 --- a/Zend/tests/result_unused.phpt +++ b/Zend/tests/result_unused.phpt @@ -24,5 +24,5 @@ $x->prop; $x->y; echo "ok\n"; --EXPECTF-- -Warning: Uninitialized string offset: 3 in %s on line %d +Warning: Uninitialized string offset 3 in %s on line %d ok diff --git a/Zend/tests/self_instanceof_outside_class.phpt b/Zend/tests/self_instanceof_outside_class.phpt index 4caef378838c5..ecb593a6a580a 100644 --- a/Zend/tests/self_instanceof_outside_class.phpt +++ b/Zend/tests/self_instanceof_outside_class.phpt @@ -14,4 +14,4 @@ $fn(); ?> --EXPECT-- -Cannot access self:: when no class scope is active +Cannot access "self" when no class scope is active diff --git a/Zend/tests/self_method_or_prop_outside_class.phpt b/Zend/tests/self_method_or_prop_outside_class.phpt index e4a499def8a88..feaeccf25f95f 100644 --- a/Zend/tests/self_method_or_prop_outside_class.phpt +++ b/Zend/tests/self_method_or_prop_outside_class.phpt @@ -30,7 +30,7 @@ $fn(); ?> --EXPECT-- -Cannot access self:: when no class scope is active -Cannot access self:: when no class scope is active -Cannot access self:: when no class scope is active -Cannot access self:: when no class scope is active +Cannot access "self" when no class scope is active +Cannot access "self" when no class scope is active +Cannot access "self" when no class scope is active +Cannot access "self" when no class scope is active diff --git a/Zend/tests/static_method_non_existing_class.phpt b/Zend/tests/static_method_non_existing_class.phpt index a395c054c54a3..752655d227826 100644 --- a/Zend/tests/static_method_non_existing_class.phpt +++ b/Zend/tests/static_method_non_existing_class.phpt @@ -12,4 +12,4 @@ try { ?> --EXPECT-- -Class 'Test' not found +Class "Test" not found diff --git a/Zend/tests/str_offset_001.phpt b/Zend/tests/str_offset_001.phpt index 02e7ccb666dab..8cfcf736ee993 100644 --- a/Zend/tests/str_offset_001.phpt +++ b/Zend/tests/str_offset_001.phpt @@ -28,19 +28,19 @@ string(1) "a" string(1) "b" string(1) "c" -Warning: Uninitialized string offset: 3 in %s on line %d +Warning: Uninitialized string offset 3 in %s on line %d string(0) "" string(1) "b" -Warning: Uninitialized string offset: 1 in %s on line %d +Warning: Uninitialized string offset 1 in %s on line %d string(0) "" string(1) "a" string(1) "b" string(1) "c" -Warning: Uninitialized string offset: 3 in %s on line %d +Warning: Uninitialized string offset 3 in %s on line %d string(0) "" string(1) "b" -Warning: Uninitialized string offset: 1 in %s on line %d +Warning: Uninitialized string offset 1 in %s on line %d string(0) "" diff --git a/Zend/tests/str_offset_003.phpt b/Zend/tests/str_offset_003.phpt index db7644c32102d..dd6e719303c46 100644 --- a/Zend/tests/str_offset_003.phpt +++ b/Zend/tests/str_offset_003.phpt @@ -20,18 +20,18 @@ foo($str[2][-2]); foo($str[2][-1]); ?> --EXPECTF-- -Warning: Uninitialized string offset: -10 in %s on line %d +Warning: Uninitialized string offset -10 in %s on line %d string(0) "" string(1) "d" -Warning: Uninitialized string offset: -2 in %s on line %d +Warning: Uninitialized string offset -2 in %s on line %d string(0) "" string(1) "c" -Warning: Uninitialized string offset: -10 in %s on line %d +Warning: Uninitialized string offset -10 in %s on line %d string(0) "" string(1) "d" -Warning: Uninitialized string offset: -2 in %s on line %d +Warning: Uninitialized string offset -2 in %s on line %d string(0) "" string(1) "c" diff --git a/Zend/tests/str_offset_004.phpt b/Zend/tests/str_offset_004.phpt index a0f89e9186129..02f00d581e7f0 100644 --- a/Zend/tests/str_offset_004.phpt +++ b/Zend/tests/str_offset_004.phpt @@ -41,7 +41,7 @@ string(15) "abCZefghijklmno" string(15) "abCZefghijPlmno" string(15) "abCZefghijPQmno" -Warning: Illegal string offset: -20 in %sstr_offset_004.php on line %d +Warning: Illegal string offset -20 in %s on line %d string(15) "abCZefghijPQmno" string(15) "AbCZefghijPQmno" string(21) "AbCZefghijPQmno N" diff --git a/Zend/tests/string_offset_int_min_max.phpt b/Zend/tests/string_offset_int_min_max.phpt index 3f875f22bbb92..008a55161c15a 100644 --- a/Zend/tests/string_offset_int_min_max.phpt +++ b/Zend/tests/string_offset_int_min_max.phpt @@ -9,8 +9,8 @@ var_dump($str[PHP_INT_MIN]); ?> --EXPECTF-- -Warning: Uninitialized string offset: %d in %s on line %d +Warning: Uninitialized string offset %d in %s on line %d string(0) "" -Warning: Uninitialized string offset: -%d in %s on line %d +Warning: Uninitialized string offset -%d in %s on line %d string(0) "" diff --git a/Zend/tests/temporary_cleaning_012.phpt b/Zend/tests/temporary_cleaning_012.phpt index fdbea6d41d25b..95d2fc1233d4d 100644 --- a/Zend/tests/temporary_cleaning_012.phpt +++ b/Zend/tests/temporary_cleaning_012.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECT-- -Access to undeclared static property: Foo::$property +Access to undeclared static property Foo::$property diff --git a/Zend/tests/traits/bugs/missing-trait.phpt b/Zend/tests/traits/bugs/missing-trait.phpt index d8ede9dfa7225..4bf054e889002 100644 --- a/Zend/tests/traits/bugs/missing-trait.phpt +++ b/Zend/tests/traits/bugs/missing-trait.phpt @@ -12,4 +12,4 @@ $test = new TraitsTest(); ?> --EXPECTF-- -Fatal error: Trait 'THello' not found in %s on line %d +Fatal error: Trait "THello" not found in %s on line %d diff --git a/Zend/tests/traits/error_002.phpt b/Zend/tests/traits/error_002.phpt index 0c2f19d2df172..53ad403a43373 100644 --- a/Zend/tests/traits/error_002.phpt +++ b/Zend/tests/traits/error_002.phpt @@ -9,4 +9,4 @@ class A { ?> --EXPECTF-- -Fatal error: Trait 'abc' not found in %s on line %d +Fatal error: Trait "abc" not found in %s on line %d diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt index 999fed6c8e5cf..28586e4fdeac1 100644 --- a/Zend/tests/traits/error_012.phpt +++ b/Zend/tests/traits/error_012.phpt @@ -16,7 +16,7 @@ var_dump($x->test()); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to protected method bar::test() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method bar::test() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt index 2d87de92e821d..8a170e665f6d1 100644 --- a/Zend/tests/traits/language008a.phpt +++ b/Zend/tests/traits/language008a.phpt @@ -20,7 +20,7 @@ $o->sayHello(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to protected method MyClass::sayHello() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method MyClass::sayHello() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt index e40ff59282268..33bea34f78189 100644 --- a/Zend/tests/traits/language008b.phpt +++ b/Zend/tests/traits/language008b.phpt @@ -27,7 +27,7 @@ $o->sayHelloWorld(); ?> --EXPECTF-- Hello World!Hello World! -Fatal error: Uncaught Error: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private method MyClass::sayHelloWorld() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/type_declarations/typed_properties_021.phpt b/Zend/tests/type_declarations/typed_properties_021.phpt index eb4b61ac02e3b..d4d4d0ed19d2f 100644 --- a/Zend/tests/type_declarations/typed_properties_021.phpt +++ b/Zend/tests/type_declarations/typed_properties_021.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -Class 'BAR' not found +Class "BAR" not found diff --git a/Zend/tests/type_declarations/typed_properties_022.phpt b/Zend/tests/type_declarations/typed_properties_022.phpt index 8c72efd5b1700..aeed60dcacca9 100644 --- a/Zend/tests/type_declarations/typed_properties_022.phpt +++ b/Zend/tests/type_declarations/typed_properties_022.phpt @@ -9,7 +9,7 @@ class Foo { $foo = new Foo(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'BAR' not found in %s:%d +Fatal error: Uncaught Error: Class "BAR" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/type_declarations/variance/unlinked_parent_1.phpt b/Zend/tests/type_declarations/variance/unlinked_parent_1.phpt index fcce42424dc11..2b5a9c8423eb6 100644 --- a/Zend/tests/type_declarations/variance/unlinked_parent_1.phpt +++ b/Zend/tests/type_declarations/variance/unlinked_parent_1.phpt @@ -16,4 +16,4 @@ try { ?> --EXPECT-- -Class 'B' not found +Class "B" not found diff --git a/Zend/tests/type_declarations/variance/unlinked_parent_2.phpt b/Zend/tests/type_declarations/variance/unlinked_parent_2.phpt index b947c6f4b6b20..247e1cf2b10b0 100644 --- a/Zend/tests/type_declarations/variance/unlinked_parent_2.phpt +++ b/Zend/tests/type_declarations/variance/unlinked_parent_2.phpt @@ -16,4 +16,4 @@ try { ?> --EXPECT-- -Interface 'B' not found +Interface "B" not found diff --git a/Zend/tests/undef_index_to_exception.phpt b/Zend/tests/undef_index_to_exception.phpt index 919b0d47a2007..c01aaba6580d6 100644 --- a/Zend/tests/undef_index_to_exception.phpt +++ b/Zend/tests/undef_index_to_exception.phpt @@ -36,11 +36,11 @@ try { ?> --EXPECT-- -Undefined offset: 0 +Undefined array key 0 array(0) { } -Undefined index: key +Undefined array key "key" array(0) { } -Undefined index: test +Undefined array key "test" Undefined variable $test diff --git a/Zend/tests/unset_cv06.phpt b/Zend/tests/unset_cv06.phpt index 073a3007f98db..9de91c535d3aa 100644 --- a/Zend/tests/unset_cv06.phpt +++ b/Zend/tests/unset_cv06.phpt @@ -18,5 +18,5 @@ echo "ok\n"; --EXPECTF-- 1 -Notice: Undefined index: x in %sunset_cv06.php on line %d +Notice: Undefined array key "x" in %s on line %d ok diff --git a/Zend/tests/use_const/no_global_fallback.phpt b/Zend/tests/use_const/no_global_fallback.phpt index f9ee6055153b2..d6f9265607356 100644 --- a/Zend/tests/use_const/no_global_fallback.phpt +++ b/Zend/tests/use_const/no_global_fallback.phpt @@ -10,7 +10,7 @@ var_dump(baz); ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'foo\bar\baz' in %s:%d +Fatal error: Uncaught Error: Undefined constant "foo\bar\baz" in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/Zend/tests/use_unlinked_class.phpt b/Zend/tests/use_unlinked_class.phpt index 46ef2afd40d98..17e12418dbef4 100644 --- a/Zend/tests/use_unlinked_class.phpt +++ b/Zend/tests/use_unlinked_class.phpt @@ -12,7 +12,7 @@ class A implements I { ?> --EXPECTF-- -Fatal error: Uncaught ReflectionException: Class A does not exist in %s:%d +Fatal error: Uncaught ReflectionException: Class "A" does not exist in %s:%d Stack trace: #0 %s(%d): ReflectionClass->__construct('A') #1 %s(%d): {closure}('I') diff --git a/Zend/tests/varSyntax/encapsed_string_deref.phpt b/Zend/tests/varSyntax/encapsed_string_deref.phpt index 10af3c115898d..386e15932e6b2 100644 --- a/Zend/tests/varSyntax/encapsed_string_deref.phpt +++ b/Zend/tests/varSyntax/encapsed_string_deref.phpt @@ -22,7 +22,7 @@ var_dump("foo$bar"()); --EXPECTF-- string(1) "f" -Warning: Attempt to read property 'prop' on string in %s on line %d +Warning: Attempt to read property "prop" on string in %s on line %d NULL Call to a member function method() on string int(42) diff --git a/Zend/tests/varSyntax/magic_const_deref.phpt b/Zend/tests/varSyntax/magic_const_deref.phpt index dc293ba6abf87..54a5c95069ce2 100644 --- a/Zend/tests/varSyntax/magic_const_deref.phpt +++ b/Zend/tests/varSyntax/magic_const_deref.phpt @@ -19,6 +19,6 @@ test(); --EXPECTF-- string(1) "t" -Warning: Attempt to read property 'prop' on string in %s on line %d +Warning: Attempt to read property "prop" on string in %s on line %d NULL Call to a member function method() on string diff --git a/Zend/tests/varSyntax/propertyOfStringError.phpt b/Zend/tests/varSyntax/propertyOfStringError.phpt index 2d47fd5c4d7af..b0658faa7afd3 100644 --- a/Zend/tests/varSyntax/propertyOfStringError.phpt +++ b/Zend/tests/varSyntax/propertyOfStringError.phpt @@ -7,4 +7,4 @@ Cannot take property of a string ?> --EXPECTF-- -Warning: Attempt to read property 'bar' on string in %s on line %d +Warning: Attempt to read property "bar" on string in %s on line %d diff --git a/Zend/tests/weakrefs/weakrefs_005.phpt b/Zend/tests/weakrefs/weakrefs_005.phpt index a9ba45b7601c3..cefc558f126a0 100644 --- a/Zend/tests/weakrefs/weakrefs_005.phpt +++ b/Zend/tests/weakrefs/weakrefs_005.phpt @@ -5,7 +5,7 @@ WeakReference no __construct new WeakReference(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Direct instantiation of 'WeakReference' is not allowed, use WeakReference::create instead in %s:2 +Fatal error: Uncaught Error: Direct instantiation of WeakReference is not allowed, use WeakReference::create instead in %s:2 Stack trace: #0 %s(2): WeakReference->__construct() #1 {main} diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 8fd319ea2e82f..6e200a15c3d54 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -42,10 +42,10 @@ static zend_module_entry **module_post_deactivate_handlers; static zend_class_entry **class_cleanup_handlers; -ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array) /* {{{ */ +ZEND_API int _zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array) /* {{{ */ { zval *param_ptr; - int arg_count; + uint32_t arg_count; param_ptr = ZEND_CALL_ARG(EG(current_execute_data), 1); arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); @@ -64,10 +64,10 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array } /* }}} */ -ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array) /* {{{ */ +ZEND_API int zend_copy_parameters_array(uint32_t param_count, zval *argument_array) /* {{{ */ { zval *param_ptr; - int arg_count; + uint32_t arg_count; param_ptr = ZEND_CALL_ARG(EG(current_execute_data), 1); arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); @@ -180,28 +180,24 @@ ZEND_API zend_string *zend_zval_get_legacy_type(const zval *arg) /* {{{ */ } /* }}} */ -ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_error(void) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error(void) /* {{{ */ { int num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); zend_function *active_function = EG(current_execute_data)->func; const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : ""; zend_argument_count_error( - "%s%s%s() expects %s %d parameter%s, %d given", + "%s%s%s() expects exactly 0 parameters, %d given", class_name, \ class_name[0] ? "::" : "", \ ZSTR_VAL(active_function->common.function_name), - "exactly", - 0, - "s", num_args); - return FAILURE; } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_num_args, int max_num_args) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(uint32_t min_num_args, uint32_t max_num_args) /* {{{ */ { - int num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); + uint32_t num_args = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); zend_function *active_function = EG(current_execute_data)->func; const char *class_name = active_function->common.scope ? ZSTR_VAL(active_function->common.scope->name) : ""; @@ -217,7 +213,34 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_ } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error(int error_code, uint32_t num, char *name, zend_expected_type expected_type, zval *arg) /* {{{ */ +{ + switch (error_code) { + case ZPP_ERROR_WRONG_CALLBACK: + zend_wrong_callback_error(num, name); + break; + case ZPP_ERROR_WRONG_CLASS: + zend_wrong_parameter_class_error(num, name, arg); + break; + case ZPP_ERROR_WRONG_CLASS_OR_NULL: + zend_wrong_parameter_class_or_null_error(num, name, arg); + break; + case ZPP_ERROR_WRONG_ARG: + zend_wrong_parameter_type_error(num, expected_type, arg); + break; + case ZPP_ERROR_WRONG_STRING_OR_CLASS: + zend_wrong_parameter_string_or_class_error(num, name, arg); + break; + case ZPP_ERROR_WRONG_STRING_OR_CLASS_OR_NULL: + zend_wrong_parameter_string_or_class_or_null_error(num, name, arg); + break; + default: + ZEND_ASSERT(error_code != ZPP_ERROR_OK); + } +} +/* }}} */ + +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(uint32_t num, zend_expected_type expected_type, zval *arg) /* {{{ */ { static const char * const expected_error[] = { Z_EXPECTED_TYPES(Z_EXPECTED_TYPE_STR) @@ -232,7 +255,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, z } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, const char *name, zval *arg) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t num, const char *name, zval *arg) /* {{{ */ { if (EG(exception)) { return; @@ -242,7 +265,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(int num, const char *name, zval *arg) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(uint32_t num, const char *name, zval *arg) /* {{{ */ { if (EG(exception)) { return; @@ -252,7 +275,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(i } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error(int num, const char *name, zval *arg) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error(uint32_t num, const char *name, zval *arg) /* {{{ */ { if (EG(exception)) { return; @@ -262,7 +285,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_null_error(int num, const char *name, zval *arg) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_null_error(uint32_t num, const char *name, zval *arg) /* {{{ */ { if (EG(exception)) { return; @@ -272,7 +295,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_nu } /* }}} */ -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error) /* {{{ */ +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(uint32_t num, char *error) /* {{{ */ { if (EG(exception)) { return; @@ -335,7 +358,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num } /* }}} */ -ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, int num, int check_null) /* {{{ */ +ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, int check_null) /* {{{ */ { zend_class_entry *ce_base = *pce; @@ -351,13 +374,13 @@ ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pc *pce = zend_lookup_class(Z_STR_P(arg)); if (ce_base) { if ((!*pce || !instanceof_function(*pce, ce_base))) { - zend_argument_type_error(num, "must be a class name derived from %s, '%s' given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); + zend_argument_type_error(num, "must be a class name derived from %s, %s given", ZSTR_VAL(ce_base->name), Z_STRVAL_P(arg)); *pce = NULL; return 0; } } if (!*pce) { - zend_argument_type_error(num, "must be a valid class name, '%s' given", Z_STRVAL_P(arg)); + zend_argument_type_error(num, "must be a valid class name, %s given", Z_STRVAL_P(arg)); return 0; } return 1; @@ -761,14 +784,14 @@ static const char *zend_parse_arg_impl(zval *arg, va_list *va, const char **spec } if (ce_base) { if ((!*pce || !instanceof_function(*pce, ce_base))) { - zend_spprintf(error, 0, "a class name derived from %s%s, '%s' given", + zend_spprintf(error, 0, "a class name derived from %s%s, %s given", ZSTR_VAL(ce_base->name), check_null ? " or null" : "", Z_STRVAL_P(arg)); *pce = NULL; return ""; } } if (!*pce) { - zend_spprintf(error, 0, "a valid class name%s, '%s' given", + zend_spprintf(error, 0, "a valid class name%s, %s given", check_null ? " or null" : "", Z_STRVAL_P(arg)); return ""; } @@ -1066,7 +1089,7 @@ ZEND_API int zend_parse_method_parameters(uint32_t num_args, zval *this_ptr, con *object = this_ptr; if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce)) { - zend_error_noreturn(E_CORE_ERROR, "%s::%s() must be derived from %s::%s", + zend_error_noreturn(E_CORE_ERROR, "%s::%s() must be derived from %s::%s()", ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), get_active_function_name(), ZSTR_VAL(ce->name), get_active_function_name()); } @@ -1099,7 +1122,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, uint32_t num_args, zval if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce)) { if (!(flags & ZEND_PARSE_PARAMS_QUIET)) { - zend_error_noreturn(E_CORE_ERROR, "%s::%s() must be derived from %s::%s", + zend_error_noreturn(E_CORE_ERROR, "%s::%s() must be derived from %s::%s()", ZSTR_VAL(ce->name), get_active_function_name(), ZSTR_VAL(Z_OBJCE_P(this_ptr)->name), get_active_function_name()); } va_end(va); @@ -1373,177 +1396,159 @@ ZEND_API int object_init_ex(zval *arg, zend_class_entry *class_type) /* {{{ */ } /* }}} */ -ZEND_API int object_init(zval *arg) /* {{{ */ +ZEND_API void object_init(zval *arg) /* {{{ */ { ZVAL_OBJ(arg, zend_objects_new(zend_standard_class_def)); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */ +ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */ { zval tmp; ZVAL_LONG(&tmp, n); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */ +ZEND_API void add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */ { zval tmp; ZVAL_NULL(&tmp); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */ +ZEND_API void add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */ { zval tmp; ZVAL_BOOL(&tmp, b); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */ +ZEND_API void add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */ { zval tmp; ZVAL_RES(&tmp, r); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */ +ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */ { zval tmp; ZVAL_DOUBLE(&tmp, d); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */ +ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */ { zval tmp; ZVAL_STR(&tmp, str); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */ +ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */ { zval tmp; ZVAL_STRING(&tmp, str); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */ +ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */ { zval tmp; ZVAL_STRINGL(&tmp, str, length); zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */ +ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */ { zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, value); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_long(zval *arg, zend_ulong index, zend_long n) /* {{{ */ +ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n) /* {{{ */ { zval tmp; ZVAL_LONG(&tmp, n); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_null(zval *arg, zend_ulong index) /* {{{ */ +ZEND_API void add_index_null(zval *arg, zend_ulong index) /* {{{ */ { zval tmp; ZVAL_NULL(&tmp); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_bool(zval *arg, zend_ulong index, int b) /* {{{ */ +ZEND_API void add_index_bool(zval *arg, zend_ulong index, int b) /* {{{ */ { zval tmp; ZVAL_BOOL(&tmp, b); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_resource(zval *arg, zend_ulong index, zend_resource *r) /* {{{ */ +ZEND_API void add_index_resource(zval *arg, zend_ulong index, zend_resource *r) /* {{{ */ { zval tmp; ZVAL_RES(&tmp, r); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_double(zval *arg, zend_ulong index, double d) /* {{{ */ +ZEND_API void add_index_double(zval *arg, zend_ulong index, double d) /* {{{ */ { zval tmp; ZVAL_DOUBLE(&tmp, d); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_str(zval *arg, zend_ulong index, zend_string *str) /* {{{ */ +ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str) /* {{{ */ { zval tmp; ZVAL_STR(&tmp, str); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_string(zval *arg, zend_ulong index, const char *str) /* {{{ */ +ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str) /* {{{ */ { zval tmp; ZVAL_STRING(&tmp, str); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ -ZEND_API int add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length) /* {{{ */ +ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length) /* {{{ */ { zval tmp; ZVAL_STRINGL(&tmp, str, length); zend_hash_index_update(Z_ARRVAL_P(arg), index, &tmp); - return SUCCESS; } /* }}} */ @@ -1565,7 +1570,7 @@ ZEND_API int add_next_index_null(zval *arg) /* {{{ */ } /* }}} */ -ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */ +ZEND_API int add_next_index_bool(zval *arg, zend_bool b) /* {{{ */ { zval tmp; @@ -1660,94 +1665,89 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */ } /* }}} */ -ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */ +ZEND_API void add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */ { zval tmp; ZVAL_LONG(&tmp, n); - return add_property_zval_ex(arg, key, key_len, &tmp); + add_property_zval_ex(arg, key, key_len, &tmp); } /* }}} */ -ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b) /* {{{ */ +ZEND_API void add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b) /* {{{ */ { zval tmp; ZVAL_BOOL(&tmp, b); - return add_property_zval_ex(arg, key, key_len, &tmp); + add_property_zval_ex(arg, key, key_len, &tmp); } /* }}} */ -ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */ +ZEND_API void add_property_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */ { zval tmp; ZVAL_NULL(&tmp); - return add_property_zval_ex(arg, key, key_len, &tmp); + add_property_zval_ex(arg, key, key_len, &tmp); } /* }}} */ -ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */ +ZEND_API void add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */ { zval tmp; ZVAL_RES(&tmp, r); add_property_zval_ex(arg, key, key_len, &tmp); zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ - return SUCCESS; } /* }}} */ -ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */ +ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */ { zval tmp; ZVAL_DOUBLE(&tmp, d); - return add_property_zval_ex(arg, key, key_len, &tmp); + add_property_zval_ex(arg, key, key_len, &tmp); } /* }}} */ -ZEND_API int add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */ +ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */ { zval tmp; ZVAL_STR(&tmp, str); add_property_zval_ex(arg, key, key_len, &tmp); zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ - return SUCCESS; } /* }}} */ -ZEND_API int add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */ +ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */ { zval tmp; ZVAL_STRING(&tmp, str); add_property_zval_ex(arg, key, key_len, &tmp); zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ - return SUCCESS; } /* }}} */ -ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */ +ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */ { zval tmp; ZVAL_STRINGL(&tmp, str, length); add_property_zval_ex(arg, key, key_len, &tmp); zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ - return SUCCESS; } /* }}} */ -ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */ +ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */ { zend_string *str; str = zend_string_init(key, key_len, 0); Z_OBJ_HANDLER_P(arg, write_property)(Z_OBJ_P(arg), str, value, NULL); zend_string_release_ex(str, 0); - return SUCCESS; } /* }}} */ @@ -1776,7 +1776,7 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module) /* {{{ */ if ((req_mod = zend_hash_find_ptr(&module_registry, lcname)) == NULL || !req_mod->module_started) { zend_string_efree(lcname); /* TODO: Check version relationship */ - zend_error(E_CORE_WARNING, "Cannot load module '%s' because required module '%s' is not loaded", module->name, dep->name); + zend_error(E_CORE_WARNING, "Cannot load module \"%s\" because required module \"%s\" is not loaded", module->name, dep->name); module->module_started = 0; return FAILURE; } @@ -1921,11 +1921,10 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */ } /* }}} */ -ZEND_API int zend_startup_modules(void) /* {{{ */ +ZEND_API void zend_startup_modules(void) /* {{{ */ { zend_hash_sort_ex(&module_registry, zend_sort_modules, NULL, 0); zend_hash_apply(&module_registry, zend_startup_module_zval); - return SUCCESS; } /* }}} */ @@ -1964,7 +1963,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) / if (zend_hash_exists(&module_registry, lcname) || zend_get_extension(dep->name)) { zend_string_efree(lcname); /* TODO: Check version relationship */ - zend_error(E_CORE_WARNING, "Cannot load module '%s' because conflicting module '%s' is already loaded", module->name, dep->name); + zend_error(E_CORE_WARNING, "Cannot load module \"%s\" because conflicting module \"%s\" is already loaded", module->name, dep->name); return NULL; } zend_string_efree(lcname); @@ -1979,7 +1978,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) / lcname = zend_new_interned_string(lcname); if ((module_ptr = zend_hash_add_mem(&module_registry, lcname, module, sizeof(zend_module_entry))) == NULL) { - zend_error(E_CORE_WARNING, "Module '%s' already loaded", module->name); + zend_error(E_CORE_WARNING, "Module \"%s\" is already loaded", module->name); zend_string_release(lcname); return NULL; } @@ -2712,7 +2711,7 @@ ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zen } /* }}} */ -ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */ +ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */ { HashTable *symbol_table; va_list symbol_table_list; @@ -2815,7 +2814,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_class_entry *sco *strict_class = 0; if (zend_string_equals_literal(lcname, "self")) { if (!scope) { - if (error) *error = estrdup("cannot access self:: when no class scope is active"); + if (error) *error = estrdup("cannot access \"self\" when no class scope is active"); } else { fcc->called_scope = zend_get_called_scope(EG(current_execute_data)); fcc->calling_scope = scope; @@ -2826,9 +2825,9 @@ static int zend_is_callable_check_class(zend_string *name, zend_class_entry *sco } } else if (zend_string_equals_literal(lcname, "parent")) { if (!scope) { - if (error) *error = estrdup("cannot access parent:: when no class scope is active"); + if (error) *error = estrdup("cannot access \"parent\" when no class scope is active"); } else if (!scope->parent) { - if (error) *error = estrdup("cannot access parent:: when current class scope has no parent"); + if (error) *error = estrdup("cannot access \"parent\" when current class scope has no parent"); } else { fcc->called_scope = zend_get_called_scope(EG(current_execute_data)); fcc->calling_scope = scope->parent; @@ -2842,7 +2841,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_class_entry *sco zend_class_entry *called_scope = zend_get_called_scope(EG(current_execute_data)); if (!called_scope) { - if (error) *error = estrdup("cannot access static:: when no class scope is active"); + if (error) *error = estrdup("cannot access \"static\" when no class scope is active"); } else { fcc->called_scope = called_scope; fcc->calling_scope = called_scope; @@ -2878,7 +2877,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_class_entry *sco *strict_class = 1; ret = 1; } else { - if (error) zend_spprintf(error, 0, "class '%.*s' not found", (int)name_len, ZSTR_VAL(name)); + if (error) zend_spprintf(error, 0, "class \"%.*s\" not found", (int)name_len, ZSTR_VAL(name)); } ZSTR_ALLOCA_FREE(lcname, use_heap); return ret; @@ -2973,7 +2972,7 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval ftable = &fcc->calling_scope->function_table; if (ce_org && !instanceof_function(ce_org, fcc->calling_scope)) { - if (error) zend_spprintf(error, 0, "class '%s' is not a subclass of '%s'", ZSTR_VAL(ce_org->name), ZSTR_VAL(fcc->calling_scope->name)); + if (error) zend_spprintf(error, 0, "class %s is not a subclass of %s", ZSTR_VAL(ce_org->name), ZSTR_VAL(fcc->calling_scope->name)); return 0; } mname = zend_string_init(Z_STRVAL_P(callable) + clen + 2, mlen, 0); @@ -2986,7 +2985,7 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval } else { /* We already checked for plain function before. */ if (error && !(check_flags & IS_CALLABLE_CHECK_SILENT)) { - zend_spprintf(error, 0, "function '%s' not found or invalid function name", Z_STRVAL_P(callable)); + zend_spprintf(error, 0, "function \"%s\" not found or invalid function name", Z_STRVAL_P(callable)); } return 0; } @@ -3105,9 +3104,9 @@ static zend_always_inline int zend_is_callable_check_func(int check_flags, zval } } else if (error && !(check_flags & IS_CALLABLE_CHECK_SILENT)) { if (fcc->calling_scope) { - if (error) zend_spprintf(error, 0, "class '%s' does not have a method '%s'", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(mname)); + if (error) zend_spprintf(error, 0, "class %s does not have a method \"%s\"", ZSTR_VAL(fcc->calling_scope->name), ZSTR_VAL(mname)); } else { - if (error) zend_spprintf(error, 0, "function '%s' does not exist", ZSTR_VAL(mname)); + if (error) zend_spprintf(error, 0, "function %s() does not exist", ZSTR_VAL(mname)); } } zend_string_release_ex(lmname, 0); @@ -3366,7 +3365,7 @@ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem) /* } /* }}} */ -ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, int *param_count, zval **params) /* {{{ */ +ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, uint32_t *param_count, zval **params) /* {{{ */ { *param_count = fci->param_count; *params = fci->params; @@ -3375,7 +3374,7 @@ ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, int *param_count, } /* }}} */ -ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, int param_count, zval *params) /* {{{ */ +ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, uint32_t param_count, zval *params) /* {{{ */ { zend_fcall_info_args_clear(fci, 1); fci->param_count = param_count; @@ -3422,71 +3421,53 @@ ZEND_API int zend_fcall_info_args(zend_fcall_info *fci, zval *args) /* {{{ */ } /* }}} */ -ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv) /* {{{ */ +ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv) /* {{{ */ { - int i; - - if (argc < 0) { - return FAILURE; - } - zend_fcall_info_args_clear(fci, !argc); if (argc) { fci->param_count = argc; fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval)); - for (i = 0; i < argc; ++i) { + for (uint32_t i = 0; i < argc; ++i) { ZVAL_COPY(&fci->params[i], &argv[i]); } } - - return SUCCESS; } /* }}} */ -ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv) /* {{{ */ +ZEND_API void zend_fcall_info_argv(zend_fcall_info *fci, uint32_t argc, va_list *argv) /* {{{ */ { - int i; - zval *arg; - - if (argc < 0) { - return FAILURE; - } - zend_fcall_info_args_clear(fci, !argc); if (argc) { + zval *arg; fci->param_count = argc; fci->params = (zval *) erealloc(fci->params, fci->param_count * sizeof(zval)); - for (i = 0; i < argc; ++i) { + for (uint32_t i = 0; i < argc; ++i) { arg = va_arg(*argv, zval *); ZVAL_COPY(&fci->params[i], arg); } } - - return SUCCESS; } /* }}} */ -ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...) /* {{{ */ +ZEND_API void zend_fcall_info_argn(zend_fcall_info *fci, uint32_t argc, ...) /* {{{ */ { - int ret; va_list argv; va_start(argv, argc); - ret = zend_fcall_info_argv(fci, argc, &argv); + zend_fcall_info_argv(fci, argc, &argv); va_end(argv); - - return ret; } /* }}} */ ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval_ptr, zval *args) /* {{{ */ { zval retval, *org_params = NULL; - int result, org_count = 0; + uint32_t org_count = 0; + int result; fci->retval = retval_ptr ? retval_ptr : &retval; if (args) { @@ -3764,73 +3745,71 @@ ZEND_API int zend_try_assign_typed_ref_zval_ex(zend_reference *ref, zval *zv, ze } /* }}} */ -ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */ +ZEND_API void zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */ { zend_declare_typed_property(ce, name, property, access_type, doc_comment, (zend_type) ZEND_TYPE_INIT_NONE(0)); - return SUCCESS; } /* }}} */ -ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */ +ZEND_API void zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */ { zend_string *key = zend_string_init(name, name_length, is_persistent_class(ce)); - int ret = zend_declare_property_ex(ce, key, property, access_type, NULL); + zend_declare_property_ex(ce, key, property, access_type, NULL); zend_string_release(key); - return ret; } /* }}} */ -ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type) /* {{{ */ { zval property; ZVAL_NULL(&property); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ -ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */ { zval property; ZVAL_BOOL(&property, value); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ -ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */ { zval property; ZVAL_LONG(&property, value); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ -ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type) /* {{{ */ { zval property; ZVAL_DOUBLE(&property, value); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ -ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type) /* {{{ */ { zval property; ZVAL_NEW_STR(&property, zend_string_init(value, strlen(value), ce->type & ZEND_INTERNAL_CLASS)); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ -ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type) /* {{{ */ +ZEND_API void zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type) /* {{{ */ { zval property; ZVAL_NEW_STR(&property, zend_string_init(value, value_len, ce->type & ZEND_INTERNAL_CLASS)); - return zend_declare_property(ce, name, name_length, &property, access_type); + zend_declare_property(ce, name, name_length, &property, access_type); } /* }}} */ @@ -3876,7 +3855,7 @@ ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *c } /* }}} */ -ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */ +ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */ { zend_string *key; @@ -3887,58 +3866,57 @@ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, } zend_declare_class_constant_ex(ce, key, value, ZEND_ACC_PUBLIC, NULL); zend_string_release(key); - return SUCCESS; } /* }}} */ -ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length) /* {{{ */ +ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length) /* {{{ */ { zval constant; ZVAL_NULL(&constant); - return zend_declare_class_constant(ce, name, name_length, &constant); + zend_declare_class_constant(ce, name, name_length, &constant); } /* }}} */ -ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value) /* {{{ */ +ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value) /* {{{ */ { zval constant; ZVAL_LONG(&constant, value); - return zend_declare_class_constant(ce, name, name_length, &constant); + zend_declare_class_constant(ce, name, name_length, &constant); } /* }}} */ -ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */ +ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */ { zval constant; ZVAL_BOOL(&constant, value); - return zend_declare_class_constant(ce, name, name_length, &constant); + zend_declare_class_constant(ce, name, name_length, &constant); } /* }}} */ -ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value) /* {{{ */ +ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value) /* {{{ */ { zval constant; ZVAL_DOUBLE(&constant, value); - return zend_declare_class_constant(ce, name, name_length, &constant); + zend_declare_class_constant(ce, name, name_length, &constant); } /* }}} */ -ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length) /* {{{ */ +ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length) /* {{{ */ { zval constant; ZVAL_NEW_STR(&constant, zend_string_init(value, value_length, ce->type & ZEND_INTERNAL_CLASS)); - return zend_declare_class_constant(ce, name, name_length, &constant); + zend_declare_class_constant(ce, name, name_length, &constant); } /* }}} */ -ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value) /* {{{ */ +ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value) /* {{{ */ { - return zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value)); + zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value)); } /* }}} */ diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 0d019711cbb57..7876b48e55be5 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -276,10 +276,10 @@ typedef struct _zend_fcall_info_cache { ZEND_API int zend_next_free_module(void); BEGIN_EXTERN_C() -ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array); +ZEND_API int _zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array); /* internal function to efficiently copy parameters when executing __call() */ -ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array); +ZEND_API int zend_copy_parameters_array(uint32_t param_count, zval *argument_array); #define zend_get_parameters_array(ht, param_count, argument_array) \ _zend_get_parameters_array_ex(param_count, argument_array) @@ -315,7 +315,7 @@ ZEND_API int zend_startup_module(zend_module_entry *module_entry); ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry); ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module); ZEND_API int zend_startup_module_ex(zend_module_entry *module); -ZEND_API int zend_startup_modules(void); +ZEND_API void zend_startup_modules(void); ZEND_API void zend_collect_module_handlers(void); ZEND_API void zend_destroy_modules(void); ZEND_API void zend_check_magic_method_implementation( @@ -352,23 +352,23 @@ ZEND_API int zend_get_module_started(const char *module_name); ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment, zend_type type); -ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment); -ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type); -ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type); -ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type); -ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type); -ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type); -ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type); -ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type); +ZEND_API void zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment); +ZEND_API void zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type); +ZEND_API void zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type); +ZEND_API void zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type); +ZEND_API void zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type); +ZEND_API void zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type); +ZEND_API void zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type); +ZEND_API void zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type); ZEND_API zend_class_constant *zend_declare_class_constant_ex(zend_class_entry *ce, zend_string *name, zval *value, int access_type, zend_string *doc_comment); -ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value); -ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length); -ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value); -ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value); -ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value); -ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length); -ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value); +ZEND_API void zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value); +ZEND_API void zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length); +ZEND_API void zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value); +ZEND_API void zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value); +ZEND_API void zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value); +ZEND_API void zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length); +ZEND_API void zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value); ZEND_API int zend_update_class_constants(zend_class_entry *class_type); @@ -417,7 +417,7 @@ ZEND_API const char *zend_get_type_by_const(int type); #define array_init(arg) ZVAL_ARR((arg), zend_new_array(0)) #define array_init_size(arg, size) ZVAL_ARR((arg), zend_new_array(size)) -ZEND_API int object_init(zval *arg); +ZEND_API void object_init(zval *arg); ZEND_API int object_init_ex(zval *arg, zend_class_entry *ce); ZEND_API int object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties); ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type); @@ -426,15 +426,15 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties) ZEND_API void zend_merge_properties(zval *obj, HashTable *properties); -ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n); -ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len); -ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b); -ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); -ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d); -ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str); -ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str); -ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length); -ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value); +ZEND_API void add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n); +ZEND_API void add_assoc_null_ex(zval *arg, const char *key, size_t key_len); +ZEND_API void add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b); +ZEND_API void add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); +ZEND_API void add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d); +ZEND_API void add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str); +ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str); +ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length); +ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value); #define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n) #define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key)) @@ -446,14 +446,14 @@ ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval #define add_assoc_stringl(__arg, __key, __str, __length) add_assoc_stringl_ex(__arg, __key, strlen(__key), __str, __length) #define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key), __value) -ZEND_API int add_index_long(zval *arg, zend_ulong index, zend_long n); -ZEND_API int add_index_null(zval *arg, zend_ulong index); -ZEND_API int add_index_bool(zval *arg, zend_ulong index, int b); -ZEND_API int add_index_resource(zval *arg, zend_ulong index, zend_resource *r); -ZEND_API int add_index_double(zval *arg, zend_ulong index, double d); -ZEND_API int add_index_str(zval *arg, zend_ulong index, zend_string *str); -ZEND_API int add_index_string(zval *arg, zend_ulong index, const char *str); -ZEND_API int add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length); +ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n); +ZEND_API void add_index_null(zval *arg, zend_ulong index); +ZEND_API void add_index_bool(zval *arg, zend_ulong index, int b); +ZEND_API void add_index_resource(zval *arg, zend_ulong index, zend_resource *r); +ZEND_API void add_index_double(zval *arg, zend_ulong index, double d); +ZEND_API void add_index_str(zval *arg, zend_ulong index, zend_string *str); +ZEND_API void add_index_string(zval *arg, zend_ulong index, const char *str); +ZEND_API void add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length); static zend_always_inline int add_index_zval(zval *arg, zend_ulong index, zval *value) { @@ -462,7 +462,7 @@ static zend_always_inline int add_index_zval(zval *arg, zend_ulong index, zval * ZEND_API int add_next_index_long(zval *arg, zend_long n); ZEND_API int add_next_index_null(zval *arg); -ZEND_API int add_next_index_bool(zval *arg, int b); +ZEND_API int add_next_index_bool(zval *arg, zend_bool b); ZEND_API int add_next_index_resource(zval *arg, zend_resource *r); ZEND_API int add_next_index_double(zval *arg, double d); ZEND_API int add_next_index_str(zval *arg, zend_string *str); @@ -476,15 +476,15 @@ static zend_always_inline int add_next_index_zval(zval *arg, zval *value) ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value); -ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l); -ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len); -ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b); -ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); -ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len, double d); -ZEND_API int add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str); -ZEND_API int add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str); -ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length); -ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value); +ZEND_API void add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l); +ZEND_API void add_property_null_ex(zval *arg, const char *key, size_t key_len); +ZEND_API void add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b); +ZEND_API void add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); +ZEND_API void add_property_double_ex(zval *arg, const char *key, size_t key_len, double d); +ZEND_API void add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str); +ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str); +ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length); +ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value); #define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key), __n) #define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key)) @@ -523,11 +523,11 @@ ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem); /** Save current arguments from zend_fcall_info *fci * params array will be set to NULL */ -ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, int *param_count, zval **params); +ZEND_API void zend_fcall_info_args_save(zend_fcall_info *fci, uint32_t *param_count, zval **params); /** Free arguments connected with zend_fcall_info *fci andset back saved ones. */ -ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, int param_count, zval *params); +ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, uint32_t param_count, zval *params); /** Set or clear the arguments in the zend_call_info struct taking care of * refcount. If args is NULL and arguments are set then those are cleared. @@ -539,19 +539,19 @@ ZEND_API int zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ -ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv); +ZEND_API void zend_fcall_info_argp(zend_fcall_info *fci, uint32_t argc, zval *argv); /** Set arguments in the zend_fcall_info struct taking care of refcount. * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ -ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv); +ZEND_API void zend_fcall_info_argv(zend_fcall_info *fci, uint32_t argc, va_list *argv); /** Set arguments in the zend_fcall_info struct taking care of refcount. * If argc is 0 the arguments which are set will be cleared, else pass * a variable amount of zval** arguments. */ -ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...); +ZEND_API void zend_fcall_info_argn(zend_fcall_info *fci, uint32_t argc, ...); /** Call a function using information created by zend_fcall_info_init()/args(). * If args is given then those replace the argument info in fci is temporarily. @@ -591,7 +591,7 @@ static zend_always_inline void zend_call_known_instance_method_with_1_params( ZEND_API void zend_call_known_instance_method_with_2_params( zend_function *fn, zend_object *object, zval *retval_ptr, zval *param1, zval *param2); -ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...); +ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, size_t name_length, zend_bool is_ref, int num_symbol_tables, ...); ZEND_API int zend_delete_global_variable(zend_string *name); @@ -1229,14 +1229,15 @@ typedef enum _zend_expected_type { Z_EXPECTED_LAST } zend_expected_type; -ZEND_API ZEND_COLD int ZEND_FASTCALL zend_wrong_parameters_none_error(void); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_num_args, int max_num_args); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(int num, zend_expected_type expected_type, zval *arg); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(int num, const char *name, zval *arg); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(int num, const char *name, zval *arg); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error(int num, const char *name, zval *arg); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_null_error(int num, const char *name, zval *arg); -ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(int num, char *error); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_none_error(void); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(uint32_t min_num_args, uint32_t max_num_args); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_error(int error_code, uint32_t num, char *name, zend_expected_type expected_type, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_type_error(uint32_t num, zend_expected_type expected_type, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_error(uint32_t num, const char *name, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_class_or_null_error(uint32_t num, const char *name, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_error(uint32_t num, const char *name, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameter_string_or_class_or_null_error(uint32_t num, const char *name, zval *arg); +ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(uint32_t num, char *error); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_error(zend_class_entry *error_ce, uint32_t arg_num, const char *format, ...); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_type_error(uint32_t arg_num, const char *format, ...); ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num, const char *format, ...); @@ -1253,10 +1254,10 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num #define ZEND_PARSE_PARAMETERS_START_EX(flags, min_num_args, max_num_args) do { \ const int _flags = (flags); \ - int _min_num_args = (min_num_args); \ - int _max_num_args = (max_num_args); \ - int _num_args = EX_NUM_ARGS(); \ - int _i = 0; \ + uint32_t _min_num_args = (min_num_args); \ + int _max_num_args = (max_num_args); /* TODO uint32_t */ \ + uint32_t _num_args = EX_NUM_ARGS(); \ + uint32_t _i = 0; \ zval *_real_arg, *_arg = NULL; \ zend_expected_type _expected_type = Z_EXPECTED_LONG; \ char *_error = NULL; \ @@ -1296,19 +1297,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num } while (0); \ if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ - if (_error_code == ZPP_ERROR_WRONG_CALLBACK) { \ - zend_wrong_callback_error(_i, _error); \ - } else if (_error_code == ZPP_ERROR_WRONG_CLASS) { \ - zend_wrong_parameter_class_error(_i, _error, _arg); \ - } else if (_error_code == ZPP_ERROR_WRONG_CLASS_OR_NULL) { \ - zend_wrong_parameter_class_or_null_error(_i, _error, _arg); \ - } else if (_error_code == ZPP_ERROR_WRONG_ARG) { \ - zend_wrong_parameter_type_error(_i, _expected_type, _arg); \ - } else if (_error_code == ZPP_ERROR_WRONG_STRING_OR_CLASS) { \ - zend_wrong_parameter_string_or_class_error(_i, _error, _arg); \ - } else if (_error_code == ZPP_ERROR_WRONG_STRING_OR_CLASS_OR_NULL) { \ - zend_wrong_parameter_string_or_class_or_null_error(_i, _error, _arg); \ - } \ + zend_wrong_parameter_error(_error_code, _i, _error, _expected_type, _arg); \ } \ failure; \ } \ @@ -1694,7 +1683,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num /* old "+" and "*" */ #define Z_PARAM_VARIADIC_EX(spec, dest, dest_num, post_varargs) do { \ - int _num_varargs = _num_args - _i - (post_varargs); \ + uint32_t _num_varargs = _num_args - _i - (post_varargs); \ if (EXPECTED(_num_varargs > 0)) { \ dest = _real_arg + 1; \ dest_num = _num_varargs; \ @@ -1741,7 +1730,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num /* Inlined implementations shared by new and old parameter parsing APIs */ -ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, int num, int check_null); +ZEND_API int ZEND_FASTCALL zend_parse_arg_class(zval *arg, zend_class_entry **pce, uint32_t num, int check_null); ZEND_API int ZEND_FASTCALL zend_parse_arg_bool_slow(zval *arg, zend_bool *dest); ZEND_API int ZEND_FASTCALL zend_parse_arg_bool_weak(zval *arg, zend_bool *dest); ZEND_API int ZEND_FASTCALL zend_parse_arg_long_slow(zval *arg, zend_long *dest); diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c index 5ffaabfc689f6..b1e564b5e90dd 100644 --- a/Zend/zend_ast.c +++ b/Zend/zend_ast.c @@ -1590,6 +1590,7 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio break; case ZEND_AST_SWITCH_LIST: case ZEND_AST_CATCH_LIST: + case ZEND_AST_MATCH_ARM_LIST: zend_ast_export_list(str, (zend_ast_list*)ast, 0, 0, indent); break; case ZEND_AST_CLOSURE_USES: @@ -1967,6 +1968,25 @@ static ZEND_COLD void zend_ast_export_ex(smart_str *str, zend_ast *ast, int prio } zend_ast_export_stmt(str, ast->child[1], indent + 1); break; + case ZEND_AST_MATCH: + smart_str_appends(str, "match ("); + zend_ast_export_ex(str, ast->child[0], 0, indent); + smart_str_appends(str, ") {\n"); + zend_ast_export_ex(str, ast->child[1], 0, indent + 1); + zend_ast_export_indent(str, indent); + smart_str_appendc(str, '}'); + break; + case ZEND_AST_MATCH_ARM: + zend_ast_export_indent(str, indent); + if (ast->child[0]) { + zend_ast_export_list(str, (zend_ast_list*)ast->child[0], 1, 0, indent); + smart_str_appends(str, " => "); + } else { + smart_str_appends(str, "default => "); + } + zend_ast_export_ex(str, ast->child[1], 0, 0); + smart_str_appends(str, ",\n"); + break; case ZEND_AST_DECLARE: smart_str_appends(str, "declare("); ZEND_ASSERT(ast->child[0]->kind == ZEND_AST_CONST_DECL); diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h index 825c392a18da4..13f43bdc413be 100644 --- a/Zend/zend_ast.h +++ b/Zend/zend_ast.h @@ -63,6 +63,7 @@ enum _zend_ast_kind { ZEND_AST_USE, ZEND_AST_TYPE_UNION, ZEND_AST_ATTRIBUTE_LIST, + ZEND_AST_MATCH_ARM_LIST, /* 0 child nodes */ ZEND_AST_MAGIC_CONST = 0 << ZEND_AST_NUM_CHILDREN_SHIFT, @@ -141,6 +142,8 @@ enum _zend_ast_kind { ZEND_AST_GROUP_USE, ZEND_AST_CLASS_CONST_GROUP, ZEND_AST_ATTRIBUTE, + ZEND_AST_MATCH, + ZEND_AST_MATCH_ARM, /* 3 child nodes */ ZEND_AST_METHOD_CALL = 3 << ZEND_AST_NUM_CHILDREN_SHIFT, diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index f7662273433f8..69299615b46e2 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -1124,7 +1124,7 @@ ZEND_FUNCTION(class_alias) RETURN_FALSE; } } else { - zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name)); + zend_error(E_WARNING, "Class \"%s\" not found", ZSTR_VAL(class_name)); RETURN_FALSE; } } @@ -1179,22 +1179,15 @@ ZEND_FUNCTION(trigger_error) /* {{{ Sets a user-defined error handler function. Returns the previously defined error handler, or false on error */ ZEND_FUNCTION(set_error_handler) { - zval *error_handler; + zend_fcall_info fci; + zend_fcall_info_cache fcc; zend_long error_type = E_ALL; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|l", &error_handler, &error_type) == FAILURE) { + /* callable argument corresponds to the error handler */ + if (zend_parse_parameters(ZEND_NUM_ARGS(), "f!|l", &fci, &fcc, &error_type) == FAILURE) { RETURN_THROWS(); } - if (Z_TYPE_P(error_handler) != IS_NULL) { /* NULL == unset */ - if (!zend_is_callable(error_handler, 0, NULL)) { - zend_string *error_handler_name = zend_get_callable_name(error_handler); - zend_argument_type_error(1, "must be a valid callback"); - zend_string_release_ex(error_handler_name, 0); - RETURN_THROWS(); - } - } - if (Z_TYPE(EG(user_error_handler)) != IS_UNDEF) { ZVAL_COPY(return_value, &EG(user_error_handler)); } @@ -1202,12 +1195,12 @@ ZEND_FUNCTION(set_error_handler) zend_stack_push(&EG(user_error_handlers_error_reporting), &EG(user_error_handler_error_reporting)); zend_stack_push(&EG(user_error_handlers), &EG(user_error_handler)); - if (Z_TYPE_P(error_handler) == IS_NULL) { /* unset user-defined handler */ + if (!ZEND_FCI_INITIALIZED(fci)) { /* unset user-defined handler */ ZVAL_UNDEF(&EG(user_error_handler)); return; } - ZVAL_COPY(&EG(user_error_handler), error_handler); + ZVAL_COPY(&EG(user_error_handler), &(fci.function_name)); EG(user_error_handler_error_reporting) = (int)error_type; } /* }}} */ @@ -1244,33 +1237,26 @@ ZEND_FUNCTION(restore_error_handler) /* {{{ Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error */ ZEND_FUNCTION(set_exception_handler) { - zval *exception_handler; + zend_fcall_info fci; + zend_fcall_info_cache fcc; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &exception_handler) == FAILURE) { + /* callable argument corresponds to the exception handler */ + if (zend_parse_parameters(ZEND_NUM_ARGS(), "f!", &fci, &fcc) == FAILURE) { RETURN_THROWS(); } - if (Z_TYPE_P(exception_handler) != IS_NULL) { /* NULL == unset */ - if (!zend_is_callable(exception_handler, 0, NULL)) { - zend_string *exception_handler_name = zend_get_callable_name(exception_handler); - zend_argument_type_error(1, "must be a valid callback"); - zend_string_release_ex(exception_handler_name, 0); - RETURN_THROWS(); - } - } - if (Z_TYPE(EG(user_exception_handler)) != IS_UNDEF) { ZVAL_COPY(return_value, &EG(user_exception_handler)); } zend_stack_push(&EG(user_exception_handlers), &EG(user_exception_handler)); - if (Z_TYPE_P(exception_handler) == IS_NULL) { /* unset user-defined handler */ + if (!ZEND_FCI_INITIALIZED(fci)) { /* unset user-defined handler */ ZVAL_UNDEF(&EG(user_exception_handler)); return; } - ZVAL_COPY(&EG(user_exception_handler), exception_handler); + ZVAL_COPY(&EG(user_exception_handler), &(fci.function_name)); } /* }}} */ diff --git a/Zend/zend_builtin_functions.stub.php b/Zend/zend_builtin_functions.stub.php index 18b64bfa0343d..8e1bb0b94cea5 100644 --- a/Zend/zend_builtin_functions.stub.php +++ b/Zend/zend_builtin_functions.stub.php @@ -69,12 +69,12 @@ function trigger_error(string $message, int $error_type = E_USER_NOTICE): bool { function user_error(string $message, int $error_type = E_USER_NOTICE): bool {} /** @return string|array|object|null */ -function set_error_handler($error_handler, int $error_types = E_ALL) {} +function set_error_handler(?callable $error_handler, int $error_types = E_ALL) {} function restore_error_handler(): bool {} /** @return string|array|object|null */ -function set_exception_handler($exception_handler) {} +function set_exception_handler(?callable $exception_handler) {} function restore_exception_handler(): bool {} diff --git a/Zend/zend_builtin_functions_arginfo.h b/Zend/zend_builtin_functions_arginfo.h index 1964c121c978e..1fa189410c791 100644 --- a/Zend/zend_builtin_functions_arginfo.h +++ b/Zend/zend_builtin_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: f81f2b4cf552c4ee8406b91c437797feb1164be0 */ + * Stub hash: 0d3c035fc2b9f0dcdbf6efe3c740d8aa3805ec32 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -127,7 +127,7 @@ ZEND_END_ARG_INFO() #define arginfo_user_error arginfo_trigger_error ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1) - ZEND_ARG_INFO(0, error_handler) + ZEND_ARG_TYPE_INFO(0, error_handler, IS_CALLABLE, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_types, IS_LONG, 0, "E_ALL") ZEND_END_ARG_INFO() @@ -135,7 +135,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, _IS ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1) - ZEND_ARG_INFO(0, exception_handler) + ZEND_ARG_TYPE_INFO(0, exception_handler, IS_CALLABLE, 1) ZEND_END_ARG_INFO() #define arginfo_restore_exception_handler arginfo_restore_error_handler diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 1d27502388a21..6acd1e48182b8 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -209,7 +209,7 @@ ZEND_METHOD(Closure, bind) if (zend_string_equals_literal(class_name, "static")) { ce = closure->func.common.scope; } else if ((ce = zend_lookup_class(class_name)) == NULL) { - zend_error(E_WARNING, "Class '%s' not found", ZSTR_VAL(class_name)); + zend_error(E_WARNING, "Class \"%s\" not found", ZSTR_VAL(class_name)); zend_tmp_string_release(tmp_class_name); RETURN_NULL(); } @@ -354,7 +354,7 @@ ZEND_METHOD(Closure, fromCallable) static ZEND_COLD zend_function *zend_closure_get_constructor(zend_object *object) /* {{{ */ { - zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed"); + zend_throw_error(NULL, "Instantiation of class Closure is not allowed"); return NULL; } /* }}} */ @@ -597,7 +597,7 @@ static HashTable *zend_closure_get_gc(zend_object *obj, zval **table, int *n) /* /* {{{ Private constructor preventing instantiation */ ZEND_COLD ZEND_METHOD(Closure, __construct) { - zend_throw_error(NULL, "Instantiation of 'Closure' is not allowed"); + zend_throw_error(NULL, "Instantiation of class Closure is not allowed"); } /* }}} */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 205704a6348c0..cfe058b72be30 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2113,6 +2113,7 @@ ZEND_API int zend_is_smart_branch(const zend_op *opline) /* {{{ */ case ZEND_IS_SMALLER: case ZEND_IS_SMALLER_OR_EQUAL: case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_ISSET_ISEMPTY_CV: case ZEND_ISSET_ISEMPTY_VAR: case ZEND_ISSET_ISEMPTY_DIM_OBJ: @@ -5166,6 +5167,230 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */ } /* }}} */ +static uint32_t count_match_conds(zend_ast_list *arms) +{ + uint32_t num_conds = 0; + + for (uint32_t i = 0; i < arms->children; i++) { + zend_ast *arm_ast = arms->child[i]; + if (arm_ast->child[0] == NULL) { + continue; + } + + zend_ast_list *conds = zend_ast_get_list(arm_ast->child[0]); + num_conds += conds->children; + } + + return num_conds; +} + +static zend_bool can_match_use_jumptable(zend_ast_list *arms) { + for (uint32_t i = 0; i < arms->children; i++) { + zend_ast *arm_ast = arms->child[i]; + if (!arm_ast->child[0]) { + /* Skip default arm */ + continue; + } + + zend_ast_list *conds = zend_ast_get_list(arm_ast->child[0]); + for (uint32_t j = 0; j < conds->children; j++) { + zend_ast **cond_ast = &conds->child[j]; + + zend_eval_const_expr(cond_ast); + if ((*cond_ast)->kind != ZEND_AST_ZVAL) { + return 0; + } + + zval *cond_zv = zend_ast_get_zval(*cond_ast); + if (Z_TYPE_P(cond_zv) != IS_LONG && Z_TYPE_P(cond_zv) != IS_STRING) { + return 0; + } + } + } + + return 1; +} + +void zend_compile_match(znode *result, zend_ast *ast) +{ + zend_ast *expr_ast = ast->child[0]; + zend_ast_list *arms = zend_ast_get_list(ast->child[1]); + zend_bool has_default_arm = 0; + uint32_t opnum_match = (uint32_t)-1; + + znode expr_node; + zend_compile_expr(&expr_node, expr_ast); + + znode case_node; + case_node.op_type = IS_TMP_VAR; + case_node.u.op.var = get_temporary_variable(); + + uint32_t num_conds = count_match_conds(arms); + zend_uchar can_use_jumptable = can_match_use_jumptable(arms); + zend_bool uses_jumptable = can_use_jumptable && num_conds >= 2; + HashTable *jumptable = NULL; + uint32_t *jmpnz_opnums = NULL; + + for (uint32_t i = 0; i < arms->children; ++i) { + zend_ast *arm_ast = arms->child[i]; + + if (!arm_ast->child[0]) { + if (has_default_arm) { + CG(zend_lineno) = arm_ast->lineno; + zend_error_noreturn(E_COMPILE_ERROR, + "Match expressions may only contain one default arm"); + } + has_default_arm = 1; + } + } + + if (uses_jumptable) { + znode jumptable_op; + + ALLOC_HASHTABLE(jumptable); + zend_hash_init(jumptable, num_conds, NULL, NULL, 0); + jumptable_op.op_type = IS_CONST; + ZVAL_ARR(&jumptable_op.u.constant, jumptable); + + zend_op *opline = zend_emit_op(NULL, ZEND_MATCH, &expr_node, &jumptable_op); + if (opline->op1_type == IS_CONST) { + Z_TRY_ADDREF_P(CT_CONSTANT(opline->op1)); + } + opnum_match = opline - CG(active_op_array)->opcodes; + } else { + jmpnz_opnums = safe_emalloc(sizeof(uint32_t), num_conds, 0); + uint32_t cond_count = 0; + for (uint32_t i = 0; i < arms->children; ++i) { + zend_ast *arm_ast = arms->child[i]; + + if (!arm_ast->child[0]) { + continue; + } + + zend_ast_list *conds = zend_ast_get_list(arm_ast->child[0]); + for (uint32_t j = 0; j < conds->children; j++) { + zend_ast *cond_ast = conds->child[j]; + + znode cond_node; + zend_compile_expr(&cond_node, cond_ast); + + uint32_t opcode = (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) ? ZEND_CASE_STRICT : ZEND_IS_IDENTICAL; + zend_op *opline = zend_emit_op(NULL, opcode, &expr_node, &cond_node); + SET_NODE(opline->result, &case_node); + if (opline->op1_type == IS_CONST) { + Z_TRY_ADDREF_P(CT_CONSTANT(opline->op1)); + } + + jmpnz_opnums[cond_count] = zend_emit_cond_jump(ZEND_JMPNZ, &case_node, 0); + + cond_count++; + } + } + } + + uint32_t opnum_default_jmp = 0; + if (!uses_jumptable) { + opnum_default_jmp = zend_emit_jump(0); + } + + zend_bool is_first_case = 1; + uint32_t cond_count = 0; + uint32_t *jmp_end_opnums = safe_emalloc(sizeof(uint32_t), arms->children, 0); + + for (uint32_t i = 0; i < arms->children; ++i) { + zend_ast *arm_ast = arms->child[i]; + zend_ast *body_ast = arm_ast->child[1]; + + if (arm_ast->child[0] != NULL) { + zend_ast_list *conds = zend_ast_get_list(arm_ast->child[0]); + + for (uint32_t j = 0; j < conds->children; j++) { + zend_ast *cond_ast = conds->child[j]; + + if (jmpnz_opnums != NULL) { + zend_update_jump_target_to_next(jmpnz_opnums[cond_count]); + } + + if (jumptable) { + zval *cond_zv = zend_ast_get_zval(cond_ast); + zval jmp_target; + ZVAL_LONG(&jmp_target, get_next_op_number()); + + if (Z_TYPE_P(cond_zv) == IS_LONG) { + zend_hash_index_add(jumptable, Z_LVAL_P(cond_zv), &jmp_target); + } else { + ZEND_ASSERT(Z_TYPE_P(cond_zv) == IS_STRING); + zend_hash_add(jumptable, Z_STR_P(cond_zv), &jmp_target); + } + } + + cond_count++; + } + } else { + if (!uses_jumptable) { + zend_update_jump_target_to_next(opnum_default_jmp); + } + + if (jumptable) { + ZEND_ASSERT(opnum_match != (uint32_t)-1); + zend_op *opline = &CG(active_op_array)->opcodes[opnum_match]; + opline->extended_value = get_next_op_number(); + } + } + + znode body_node; + zend_compile_expr(&body_node, body_ast); + + if (is_first_case) { + zend_emit_op_tmp(result, ZEND_QM_ASSIGN, &body_node, NULL); + is_first_case = 0; + } else { + zend_op *opline_qm_assign = zend_emit_op(NULL, ZEND_QM_ASSIGN, &body_node, NULL); + SET_NODE(opline_qm_assign->result, result); + } + + jmp_end_opnums[i] = zend_emit_jump(0); + } + + // Initialize result in case there is no arm + if (arms->children == 0) { + result->op_type = IS_CONST; + ZVAL_NULL(&result->u.constant); + } + + if (!has_default_arm) { + if (!uses_jumptable) { + zend_update_jump_target_to_next(opnum_default_jmp); + } + + if (jumptable) { + zend_op *opline = &CG(active_op_array)->opcodes[opnum_match]; + opline->extended_value = get_next_op_number(); + } + + zend_op *opline = zend_emit_op(NULL, ZEND_MATCH_ERROR, &expr_node, NULL); + if (opline->op1_type == IS_CONST) { + Z_TRY_ADDREF_P(CT_CONSTANT(opline->op1)); + } + } + + for (uint32_t i = 0; i < arms->children; ++i) { + zend_update_jump_target_to_next(jmp_end_opnums[i]); + } + + if (expr_node.op_type & (IS_VAR|IS_TMP_VAR)) { + zend_op *opline = zend_emit_op(NULL, ZEND_FREE, &expr_node, NULL); + opline->extended_value = ZEND_FREE_SWITCH; + } else if (expr_node.op_type == IS_CONST) { + zval_ptr_dtor_nogc(&expr_node.u.constant); + } + + if (jmpnz_opnums != NULL) { + efree(jmpnz_opnums); + } + efree(jmp_end_opnums); +} + void zend_compile_try(zend_ast *ast) /* {{{ */ { zend_ast *try_ast = ast->child[0]; @@ -8549,7 +8774,7 @@ 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_error_noreturn(E_COMPILE_ERROR, "Cannot use \"::class\" on value of type %s", zend_zval_type_name(&expr_node.u.constant)); } @@ -9176,6 +9401,9 @@ void zend_compile_expr(znode *result, zend_ast *ast) /* {{{ */ case ZEND_AST_THROW: zend_compile_throw(result, ast); return; + case ZEND_AST_MATCH: + zend_compile_match(result, ast); + return; default: ZEND_ASSERT(0 /* not supported */); } diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 958bd36d1dab5..fe37e3fbd0454 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -353,16 +353,16 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, if (zend_string_equals_literal_ci(class_name, "self")) { if (UNEXPECTED(!scope)) { - zend_throw_error(NULL, "Cannot access self:: when no class scope is active"); + zend_throw_error(NULL, "Cannot access \"self\" when no class scope is active"); goto failure; } ce = scope; } else if (zend_string_equals_literal_ci(class_name, "parent")) { if (UNEXPECTED(!scope)) { - zend_throw_error(NULL, "Cannot access parent:: when no class scope is active"); + zend_throw_error(NULL, "Cannot access \"parent\" when no class scope is active"); goto failure; } else if (UNEXPECTED(!scope->parent)) { - zend_throw_error(NULL, "Cannot access parent:: when current class scope has no parent"); + zend_throw_error(NULL, "Cannot access \"parent\" when current class scope has no parent"); goto failure; } else { ce = scope->parent; @@ -370,7 +370,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, } else if (zend_string_equals_literal_ci(class_name, "static")) { ce = zend_get_called_scope(EG(current_execute_data)); if (UNEXPECTED(!ce)) { - zend_throw_error(NULL, "Cannot access static:: when no class scope is active"); + zend_throw_error(NULL, "Cannot access \"static\" when no class scope is active"); goto failure; } } else { @@ -380,14 +380,14 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, c = zend_hash_find_ptr(&ce->constants_table, constant_name); if (c == NULL) { if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) { - zend_throw_error(NULL, "Undefined class constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); + zend_throw_error(NULL, "Undefined constant %s::%s", ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); goto failure; } ret_constant = NULL; } else { if (!zend_verify_const_access(c, scope)) { if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) { - zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); } goto failure; } @@ -399,7 +399,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, int ret; if (IS_CONSTANT_VISITED(ret_constant)) { - zend_throw_error(NULL, "Cannot declare self-referencing constant '%s::%s'", ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); + zend_throw_error(NULL, "Cannot declare self-referencing constant %s::%s", ZSTR_VAL(class_name), ZSTR_VAL(constant_name)); ret_constant = NULL; goto failure; } @@ -456,7 +456,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope, if (!c) { if (!(flags & ZEND_FETCH_CLASS_SILENT)) { - zend_throw_error(NULL, "Undefined constant '%s'", name); + zend_throw_error(NULL, "Undefined constant \"%s\"", name); } return NULL; } diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 0103422f942da..e46e18f1d3a9c 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -40,6 +40,7 @@ ZEND_API zend_class_entry *zend_ce_argument_count_error; ZEND_API zend_class_entry *zend_ce_value_error; ZEND_API zend_class_entry *zend_ce_arithmetic_error; ZEND_API zend_class_entry *zend_ce_division_by_zero_error; +ZEND_API zend_class_entry *zend_ce_unhandled_match_error; /* Internal pseudo-exception that is not exposed to userland. */ static zend_class_entry zend_ce_unwind_exit; @@ -800,6 +801,10 @@ void zend_register_default_exception(void) /* {{{ */ zend_ce_division_by_zero_error->create_object = zend_default_exception_new; INIT_CLASS_ENTRY(zend_ce_unwind_exit, "UnwindExit", NULL); + + INIT_CLASS_ENTRY(ce, "UnhandledMatchError", NULL); + zend_ce_unhandled_match_error = zend_register_internal_class_ex(&ce, zend_ce_error); + zend_ce_unhandled_match_error->create_object = zend_default_exception_new; } /* }}} */ @@ -941,7 +946,7 @@ ZEND_API ZEND_COLD int zend_exception_error(zend_object *ex, int severity) /* {{ } zend_error_va(E_WARNING, (file && ZSTR_LEN(file) > 0) ? ZSTR_VAL(file) : NULL, line, - "Uncaught %s in exception handling during call to %s::__tostring()", + "Uncaught %s in exception handling during call to %s::__toString()", ZSTR_VAL(Z_OBJCE(zv)->name), ZSTR_VAL(ce_exception->name)); if (file) { @@ -963,7 +968,7 @@ ZEND_API ZEND_COLD int zend_exception_error(zend_object *ex, int severity) /* {{ /* We successfully unwound, nothing more to do */ result = SUCCESS; } else { - zend_error(severity, "Uncaught exception '%s'", ZSTR_VAL(ce_exception->name)); + zend_error(severity, "Uncaught exception %s", ZSTR_VAL(ce_exception->name)); } OBJ_RELEASE(ex); diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index fdae31a0137c9..95ed0f3e243da 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -35,6 +35,7 @@ extern ZEND_API zend_class_entry *zend_ce_argument_count_error; extern ZEND_API zend_class_entry *zend_ce_value_error; extern ZEND_API zend_class_entry *zend_ce_arithmetic_error; extern ZEND_API zend_class_entry *zend_ce_division_by_zero_error; +extern ZEND_API zend_class_entry *zend_ce_unhandled_match_error; ZEND_API void zend_exception_set_previous(zend_object *exception, zend_object *add_previous); ZEND_API void zend_exception_save(void); diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 29f4a08ebbc66..f2e7ba3d6e434 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -162,9 +162,6 @@ ZEND_API const zend_internal_function zend_pass_function = { zval_ptr_dtor_nogc(EX_VAR(var)); \ } -#define FREE_UNFETCHED_OP(type, var) \ - FREE_OP(type, var) - #define FREE_OP_VAR_PTR(type, var) \ FREE_OP(type, var) @@ -622,7 +619,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_POST_INC_OBJ || opline->opcode == ZEND_POST_DEC_OBJ) { zend_throw_error(NULL, - "Attempt to increment/decrement property '%s' on %s", + "Attempt to increment/decrement property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_type_name(object) ); } else if (opline->opcode == ZEND_FETCH_OBJ_W @@ -630,12 +627,12 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_throw_non_object_erro || opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG || opline->opcode == ZEND_ASSIGN_OBJ_REF) { zend_throw_error(NULL, - "Attempt to modify property '%s' on %s", + "Attempt to modify property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_type_name(object) ); } else { zend_throw_error(NULL, - "Attempt to assign property '%s' on %s", + "Attempt to assign property \"%s\" on %s", ZSTR_VAL(property_name), zend_zval_type_name(object) ); } @@ -1359,7 +1356,7 @@ static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type break; } if (type != BP_VAR_UNSET) { - zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim)); + zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim)); } break; case IS_UNDEF: @@ -1495,7 +1492,7 @@ static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_wrong_property_read(z { 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_type_name(object)); zend_tmp_string_release(tmp_property_name); } @@ -1520,7 +1517,7 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim, offset = zend_check_string_offset(dim, BP_VAR_W EXECUTE_DATA_CC); if (offset < -(zend_long)Z_STRLEN_P(str)) { /* Error on negative offset */ - zend_error(E_WARNING, "Illegal string offset: " ZEND_LONG_FMT, offset); + zend_error(E_WARNING, "Illegal string offset " ZEND_LONG_FMT, offset); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); } @@ -1901,12 +1898,12 @@ static zend_always_inline HashTable *zend_get_target_symbol_table(int fetch_type static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_offset(zend_long lval) { - zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, lval); + zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, lval); } static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_undefined_index(const zend_string *offset) { - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset)); } ZEND_API ZEND_COLD int ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval) @@ -2349,7 +2346,7 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z ZVAL_NULL(result); return; } - zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim)); + zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim)); break; case IS_UNDEF: ZVAL_UNDEFINED_OP2(); @@ -2376,7 +2373,7 @@ static zend_always_inline void zend_fetch_dimension_address_read(zval *result, z if (UNEXPECTED(Z_STRLEN_P(container) < ((offset < 0) ? -(size_t)offset : ((size_t)offset + 1)))) { if (type != BP_VAR_IS) { - zend_error(E_WARNING, "Uninitialized string offset: " ZEND_LONG_FMT, offset); + zend_error(E_WARNING, "Uninitialized string offset " ZEND_LONG_FMT, offset); ZVAL_EMPTY_STRING(result); } else { ZVAL_NULL(result); @@ -2602,7 +2599,7 @@ static zend_never_inline zend_bool ZEND_FASTCALL zend_array_key_exists_fast(Hash str = ZSTR_EMPTY_ALLOC(); goto str_key; } else { - zend_type_error("Illegal offset type"); + zend_illegal_offset(); return 0; } } @@ -2903,7 +2900,7 @@ static zend_never_inline int zend_fetch_static_property_address_ex(zval **retval if (EXPECTED((ce = CACHED_PTR(cache_slot)) == NULL)) { ce = zend_fetch_class_by_name(Z_STR_P(class_name), Z_STR_P(class_name + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP(op1_type, opline->op1.var); + FREE_OP(op1_type, opline->op1.var); return FAILURE; } if (UNEXPECTED(op1_type != IS_CONST)) { @@ -2914,7 +2911,7 @@ static zend_never_inline int zend_fetch_static_property_address_ex(zval **retval if (EXPECTED(op2_type == IS_UNUSED)) { ce = zend_fetch_class(NULL, opline->op2.num); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP(op1_type, opline->op1.var); + FREE_OP(op1_type, opline->op1.var); return FAILURE; } } else { @@ -3330,7 +3327,11 @@ static zend_never_inline void zend_fetch_this_var(int type OPLINE_DC EXECUTE_DAT static zend_never_inline ZEND_COLD void ZEND_FASTCALL zend_wrong_clone_call(zend_function *clone, zend_class_entry *scope) { - zend_throw_error(NULL, "Call to %s %s::__clone() from context '%s'", zend_visibility_string(clone->common.fn_flags), ZSTR_VAL(clone->common.scope->name), scope ? ZSTR_VAL(scope->name) : ""); + zend_throw_error(NULL, "Call to %s %s::__clone() from %s%s", + zend_visibility_string(clone->common.fn_flags), ZSTR_VAL(clone->common.scope->name), + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); } #if ZEND_INTENSIVE_DEBUGGING @@ -4302,7 +4303,7 @@ static zend_always_inline int _zend_quick_get_constant( if (!c) { if (!check_defined_only) { - zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Undefined constant \"%s\"", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } return FAILURE; diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 6a2b82f96d091..998eb495dc511 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1354,23 +1354,23 @@ zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* { case ZEND_FETCH_CLASS_SELF: scope = zend_get_executed_scope(); if (UNEXPECTED(!scope)) { - zend_throw_or_error(fetch_type, NULL, "Cannot access self:: when no class scope is active"); + zend_throw_or_error(fetch_type, NULL, "Cannot access \"self\" when no class scope is active"); } return scope; case ZEND_FETCH_CLASS_PARENT: scope = zend_get_executed_scope(); if (UNEXPECTED(!scope)) { - zend_throw_or_error(fetch_type, NULL, "Cannot access parent:: when no class scope is active"); + zend_throw_or_error(fetch_type, NULL, "Cannot access \"parent\" when no class scope is active"); return NULL; } if (UNEXPECTED(!scope->parent)) { - zend_throw_or_error(fetch_type, NULL, "Cannot access parent:: when current class scope has no parent"); + zend_throw_or_error(fetch_type, NULL, "Cannot access \"parent\" when current class scope has no parent"); } return scope->parent; case ZEND_FETCH_CLASS_STATIC: ce = zend_get_called_scope(EG(current_execute_data)); if (UNEXPECTED(!ce)) { - zend_throw_or_error(fetch_type, NULL, "Cannot access static:: when no class scope is active"); + zend_throw_or_error(fetch_type, NULL, "Cannot access \"static\" when no class scope is active"); return NULL; } return ce; @@ -1388,11 +1388,11 @@ zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* { } else if ((ce = zend_lookup_class_ex(class_name, NULL, fetch_type)) == NULL) { if (!(fetch_type & ZEND_FETCH_CLASS_SILENT) && !EG(exception)) { if (fetch_sub_type == ZEND_FETCH_CLASS_INTERFACE) { - zend_throw_or_error(fetch_type, NULL, "Interface '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Interface \"%s\" not found", ZSTR_VAL(class_name)); } else if (fetch_sub_type == ZEND_FETCH_CLASS_TRAIT) { - zend_throw_or_error(fetch_type, NULL, "Trait '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Trait \"%s\" not found", ZSTR_VAL(class_name)); } else { - zend_throw_or_error(fetch_type, NULL, "Class '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Class \"%s\" not found", ZSTR_VAL(class_name)); } } return NULL; @@ -1425,11 +1425,11 @@ zend_class_entry *zend_fetch_class_by_name(zend_string *class_name, zend_string return NULL; } if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_INTERFACE) { - zend_throw_or_error(fetch_type, NULL, "Interface '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Interface \"%s\" not found", ZSTR_VAL(class_name)); } else if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_TRAIT) { - zend_throw_or_error(fetch_type, NULL, "Trait '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Trait \"%s\" not found", ZSTR_VAL(class_name)); } else { - zend_throw_or_error(fetch_type, NULL, "Class '%s' not found", ZSTR_VAL(class_name)); + zend_throw_or_error(fetch_type, NULL, "Class \"%s\" not found", ZSTR_VAL(class_name)); } return NULL; } diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index 830de072332d4..279dcae03c931 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -335,17 +335,15 @@ ZEND_API int zend_alter_ini_entry_ex(zend_string *name, zend_string *new_value, } } - if (ini_entry->modifiable != ZEND_INI_SYSTEM) { - if (!EG(modified_ini_directives)) { - ALLOC_HASHTABLE(EG(modified_ini_directives)); - zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); - } - if (!modified) { - ini_entry->orig_value = ini_entry->value; - ini_entry->orig_modifiable = modifiable; - ini_entry->modified = 1; - zend_hash_add_ptr(EG(modified_ini_directives), ini_entry->name, ini_entry); - } + if (!EG(modified_ini_directives)) { + ALLOC_HASHTABLE(EG(modified_ini_directives)); + zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0); + } + if (!modified) { + ini_entry->orig_value = ini_entry->value; + ini_entry->orig_modifiable = modifiable; + ini_entry->modified = 1; + zend_hash_add_ptr(EG(modified_ini_directives), ini_entry->name, ini_entry); } duplicate = zend_string_copy(new_value); diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y index 7827a178f6f5b..aa3164b735d0a 100644 --- a/Zend/zend_language_parser.y +++ b/Zend/zend_language_parser.y @@ -130,6 +130,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %token T_ENDSWITCH "endswitch (T_ENDSWITCH)" %token T_CASE "case (T_CASE)" %token T_DEFAULT "default (T_DEFAULT)" +%token T_MATCH "match (T_MATCH)" %token T_BREAK "break (T_BREAK)" %token T_CONTINUE "continue (T_CONTINUE)" %token T_GOTO "goto (T_GOTO)" @@ -261,6 +262,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); %type inline_function union_type %type attributed_statement attributed_class_statement attributed_parameter %type attribute_decl attribute attributes +%type match match_arm_list non_empty_match_arm_list match_arm match_arm_cond_list %type returns_ref function fn is_reference is_variadic variable_modifiers %type method_modifiers non_empty_member_modifiers member_modifier optional_visibility_modifier @@ -284,7 +286,7 @@ reserved_non_modifiers: | T_THROW | T_USE | T_INSTEADOF | T_GLOBAL | T_VAR | T_UNSET | T_ISSET | T_EMPTY | T_CONTINUE | T_GOTO | T_FUNCTION | T_CONST | T_RETURN | T_PRINT | T_YIELD | T_LIST | T_SWITCH | T_ENDSWITCH | T_CASE | T_DEFAULT | T_BREAK | T_ARRAY | T_CALLABLE | T_EXTENDS | T_IMPLEMENTS | T_NAMESPACE | T_TRAIT | T_INTERFACE | T_CLASS - | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_FN + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_FN | T_MATCH ; semi_reserved: @@ -624,6 +626,34 @@ case_separator: ; +match: + T_MATCH '(' expr ')' '{' match_arm_list '}' + { $$ = zend_ast_create(ZEND_AST_MATCH, $3, $6); }; +; + +match_arm_list: + %empty { $$ = zend_ast_create_list(0, ZEND_AST_MATCH_ARM_LIST); } + | non_empty_match_arm_list possible_comma { $$ = $1; } +; + +non_empty_match_arm_list: + match_arm { $$ = zend_ast_create_list(1, ZEND_AST_MATCH_ARM_LIST, $1); } + | non_empty_match_arm_list ',' match_arm { $$ = zend_ast_list_add($1, $3); } +; + +match_arm: + match_arm_cond_list possible_comma T_DOUBLE_ARROW expr + { $$ = zend_ast_create(ZEND_AST_MATCH_ARM, $1, $4); } + | T_DEFAULT possible_comma T_DOUBLE_ARROW expr + { $$ = zend_ast_create(ZEND_AST_MATCH_ARM, NULL, $4); } +; + +match_arm_cond_list: + expr { $$ = zend_ast_create_list(1, ZEND_AST_EXPR_LIST, $1); } + | match_arm_cond_list ',' expr { $$ = zend_ast_list_add($1, $3); } +; + + while_statement: statement { $$ = $1; } | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } @@ -1079,6 +1109,7 @@ expr: | T_STATIC inline_function { $$ = $2; ((zend_ast_decl *) $$)->flags |= ZEND_ACC_STATIC; } | attributes T_STATIC inline_function { $$ = zend_ast_with_attributes($3, $1); ((zend_ast_decl *) $$)->flags |= ZEND_ACC_STATIC; } + | match { $$ = $1; } ; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 4580b858e015b..b6cd505a633aa 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1512,6 +1512,10 @@ NEWLINE ("\r"|"\n"|"\r\n") RETURN_TOKEN_WITH_IDENT(T_SWITCH); } +"match" { + RETURN_TOKEN_WITH_IDENT(T_MATCH); +} + "endswitch" { RETURN_TOKEN_WITH_IDENT(T_ENDSWITCH); } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 5b6f654965012..ee918f741ca1a 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -257,7 +257,7 @@ static ZEND_COLD zend_never_inline void zend_bad_property_access(zend_property_i static ZEND_COLD zend_never_inline void zend_bad_property_name(void) /* {{{ */ { - zend_throw_error(NULL, "Cannot access property started with '\\0'"); + zend_throw_error(NULL, "Cannot access property starting with \"\\0\""); } /* }}} */ @@ -1157,7 +1157,11 @@ static zend_always_inline zend_function *zend_get_user_call_function(zend_class_ static ZEND_COLD zend_never_inline void zend_bad_method_call(zend_function *fbc, zend_string *method_name, zend_class_entry *scope) /* {{{ */ { - zend_throw_error(NULL, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), scope ? ZSTR_VAL(scope->name) : ""); + zend_throw_error(NULL, "Call to %s method %s::%s() from %s%s", + zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(method_name), + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); } /* }}} */ @@ -1295,7 +1299,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st /* right now this function is used for non static method lookup too */ /* Is the function static */ if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) { - zend_error_noreturn(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(fbc->common.function_name)); + zend_error_noreturn(E_ERROR, "Cannot call non-static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), ZSTR_VAL(fbc->common.function_name)); } #endif if (!(fbc->op_array.fn_flags & ZEND_ACC_PUBLIC)) { @@ -1395,7 +1399,7 @@ ZEND_API zval *zend_std_get_static_property_with_info(zend_class_entry *ce, zend } else { undeclared_property: if (type != BP_VAR_IS) { - zend_throw_error(NULL, "Access to undeclared static property: %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name)); + zend_throw_error(NULL, "Access to undeclared static property %s::$%s", ZSTR_VAL(ce->name), ZSTR_VAL(property_name)); } return NULL; } @@ -1432,9 +1436,12 @@ ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce static ZEND_COLD zend_never_inline void zend_bad_constructor_call(zend_function *constructor, zend_class_entry *scope) /* {{{ */ { if (scope) { - zend_throw_error(NULL, "Call to %s %s::%s() from context '%s'", zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name)); + zend_throw_error(NULL, "Call to %s %s::%s() from scope %s", + zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), + ZSTR_VAL(constructor->common.function_name), ZSTR_VAL(scope->name) + ); } else { - zend_throw_error(NULL, "Call to %s %s::%s() from invalid context", zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name)); + zend_throw_error(NULL, "Call to %s %s::%s() from global scope", zend_visibility_string(constructor->common.fn_flags), ZSTR_VAL(constructor->common.scope->name), ZSTR_VAL(constructor->common.function_name)); } } /* }}} */ diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 14ca14a4b1764..d7770ecad5179 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -107,14 +107,16 @@ ZEND_API void zend_objects_destroy_object(zend_object *object) if (object->ce != scope) { zend_throw_error(NULL, - "Call to private %s::__destruct() from context '%s'", + "Call to private %s::__destruct() from %s%s", ZSTR_VAL(object->ce->name), - scope ? ZSTR_VAL(scope->name) : ""); + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); return; } } else { zend_error(E_WARNING, - "Call to private %s::__destruct() from context '' during shutdown ignored", + "Call to private %s::__destruct() from global scope during shutdown ignored", ZSTR_VAL(object->ce->name)); return; } @@ -126,14 +128,16 @@ ZEND_API void zend_objects_destroy_object(zend_object *object) if (!zend_check_protected(zend_get_function_root_class(destructor), scope)) { zend_throw_error(NULL, - "Call to protected %s::__destruct() from context '%s'", + "Call to protected %s::__destruct() from %s%s", ZSTR_VAL(object->ce->name), - scope ? ZSTR_VAL(scope->name) : ""); + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); return; } } else { zend_error(E_WARNING, - "Call to protected %s::__destruct() from context '' during shutdown ignored", + "Call to protected %s::__destruct() from global scope during shutdown ignored", ZSTR_VAL(object->ce->name)); return; } diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 983b362046d0f..06f2b9b19d147 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -763,7 +763,9 @@ static zend_bool keeps_op1_alive(zend_op *opline) { /* These opcodes don't consume their OP1 operand, * it is later freed by something else. */ if (opline->opcode == ZEND_CASE + || opline->opcode == ZEND_CASE_STRICT || opline->opcode == ZEND_SWITCH_LONG + || opline->opcode == ZEND_MATCH || opline->opcode == ZEND_FETCH_LIST_R || opline->opcode == ZEND_COPY_TMP) { return 1; @@ -1039,6 +1041,7 @@ ZEND_API int pass_two(zend_op_array *op_array) break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { /* absolute indexes to relative offsets */ HashTable *jumptable = Z_ARRVAL_P(CT_CONSTANT(opline->op2)); @@ -1108,6 +1111,7 @@ ZEND_API binary_op_type get_binary_op(int opcode) case ZEND_CONCAT: return (binary_op_type) concat_function; case ZEND_IS_IDENTICAL: + case ZEND_CASE_STRICT: return (binary_op_type) is_identical_function; case ZEND_IS_NOT_IDENTICAL: return (binary_op_type) is_not_identical_function; diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 1365958e5a475..550a251cac3b1 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -457,6 +457,20 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(16, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|T ZEND_VM_SMART_BRANCH(result, 1); } +ZEND_VM_HANDLER(196, ZEND_CASE_STRICT, TMP|VAR, CONST|TMP|VAR|CV) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); + op2 = GET_OP2_ZVAL_PTR_DEREF(BP_VAR_R); + result = fast_is_identical_function(op1, op2); + FREE_OP2(); + ZEND_VM_SMART_BRANCH(result, 1); +} + ZEND_VM_COLD_CONSTCONST_HANDLER(17, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV, SPEC(COMMUTATIVE)) { USE_OPLINE @@ -1095,7 +1109,7 @@ ZEND_VM_HANDLER(29, ZEND_ASSIGN_STATIC_PROP_OP, ANY, ANY, OP) if (UNEXPECTED(zend_fetch_static_property_address(&prop, &prop_info, (opline+1)->extended_value, BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC) != SUCCESS)) { UNDEF_RESULT(); - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); HANDLE_EXCEPTION(); } @@ -1935,8 +1949,8 @@ ZEND_VM_COLD_HELPER(zend_use_tmp_in_write_context_helper, ANY, ANY) SAVE_OPLINE(); zend_throw_error(NULL, "Cannot use temporary expression in write context"); - FREE_UNFETCHED_OP2(); - FREE_UNFETCHED_OP1(); + FREE_OP2(); + FREE_OP1(); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -1947,8 +1961,8 @@ ZEND_VM_COLD_HELPER(zend_use_undef_in_read_context_helper, ANY, ANY) SAVE_OPLINE(); zend_throw_error(NULL, "Cannot use [] for reading"); - FREE_UNFETCHED_OP2(); - FREE_UNFETCHED_OP1(); + FREE_OP2(); + FREE_OP1(); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -2480,7 +2494,7 @@ ZEND_VM_HANDLER(25, ZEND_ASSIGN_STATIC_PROP, ANY, ANY, CACHE_SLOT, SPEC(OP_DATA= SAVE_OPLINE(); if (zend_fetch_static_property_address(&prop, &prop_info, opline->extended_value, BP_VAR_W, 0 OPLINE_CC EXECUTE_DATA_CC) != SUCCESS) { - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); UNDEF_RESULT(); HANDLE_EXCEPTION(); } @@ -2523,7 +2537,6 @@ ZEND_VM_C_LABEL(try_assign_dim_array): } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - FREE_OP_DATA(); zend_cannot_add_element(); ZEND_VM_C_GOTO(assign_dim_error); } else if (OP_DATA_TYPE == IS_CV) { @@ -2579,7 +2592,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array): } else if (EXPECTED(Z_TYPE_P(object_ptr) == IS_STRING)) { if (OP2_TYPE == IS_UNUSED) { zend_use_new_element_for_string(); - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); UNDEF_RESULT(); } else { dim = GET_OP2_ZVAL_PTR(BP_VAR_R); @@ -2592,7 +2605,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array): && ZEND_REF_HAS_TYPE_SOURCES(Z_REF_P(orig_object_ptr)) && !zend_verify_ref_array_assignable(Z_REF_P(orig_object_ptr))) { dim = GET_OP2_ZVAL_PTR(BP_VAR_R); - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); UNDEF_RESULT(); } else { ZVAL_ARR(object_ptr, zend_new_array(8)); @@ -2602,7 +2615,7 @@ ZEND_VM_C_LABEL(try_assign_dim_array): zend_use_scalar_as_array(); dim = GET_OP2_ZVAL_PTR(BP_VAR_R); ZEND_VM_C_LABEL(assign_dim_error): - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); } @@ -2717,7 +2730,7 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_STATIC_PROP_REF, ANY, ANY, CACHE_SLOT|SRC) SAVE_OPLINE(); if (zend_fetch_static_property_address(&prop, &prop_info, opline->extended_value & ~ZEND_RETURNS_FUNCTION, BP_VAR_W, 0 OPLINE_CC EXECUTE_DATA_CC) != SUCCESS) { - FREE_UNFETCHED_OP_DATA(); + FREE_OP_DATA(); UNDEF_RESULT(); HANDLE_EXCEPTION(); } @@ -3522,7 +3535,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, if (UNEXPECTED(ce == NULL)) { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op1)), Z_STR_P(RT_CONSTANT(opline, opline->op1) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP2(); + FREE_OP2(); HANDLE_EXCEPTION(); } if (OP2_TYPE != IS_CONST) { @@ -3532,7 +3545,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, } else if (OP1_TYPE == IS_UNUSED) { ce = zend_fetch_class(NULL, opline->op1.num); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP2(); + FREE_OP2(); HANDLE_EXCEPTION(); } } else { @@ -4520,7 +4533,7 @@ ZEND_VM_COLD_HELPER(zend_cannot_pass_by_ref_helper, ANY, ANY) SAVE_OPLINE(); zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num); - FREE_UNFETCHED_OP1(); + FREE_OP1(); arg = ZEND_CALL_VAR(EX(call), opline->result.var); ZVAL_UNDEF(arg); HANDLE_EXCEPTION(); @@ -4930,7 +4943,7 @@ ZEND_VM_HANDLER(119, ZEND_SEND_ARRAY, ANY, ANY, NUM) } } zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); - FREE_UNFETCHED_OP2(); + FREE_OP2(); FREE_OP1(); HANDLE_EXCEPTION(); } else { @@ -5470,7 +5483,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -5484,7 +5497,7 @@ ZEND_VM_HANDLER(181, ZEND_FETCH_CLASS_CONSTANT, VAR|CONST|UNUSED|CLASS_FETCH, CO } CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); } else { - zend_throw_error(NULL, "Undefined class constant '%s::%s'", + zend_throw_error(NULL, "Undefined constant %s::%s", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -5948,7 +5961,7 @@ ZEND_VM_COLD_HANDLER(179, ZEND_UNSET_STATIC_PROP, ANY, ANY, CACHE_SLOT) if (UNEXPECTED(ce == NULL)) { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP1(); + FREE_OP1(); HANDLE_EXCEPTION(); } /*CACHE_PTR(opline->extended_value, ce);*/ @@ -5956,7 +5969,7 @@ ZEND_VM_COLD_HANDLER(179, ZEND_UNSET_STATIC_PROP, ANY, ANY, CACHE_SLOT) } else if (OP2_TYPE == IS_UNUSED) { ce = zend_fetch_class(NULL, opline->op2.num); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP1(); + FREE_OP1(); HANDLE_EXCEPTION(); } } else { @@ -7498,8 +7511,8 @@ ZEND_VM_COLD_HELPER(zend_yield_in_closed_generator_helper, ANY, ANY) SAVE_OPLINE(); zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator"); - FREE_UNFETCHED_OP2(); - FREE_UNFETCHED_OP1(); + FREE_OP2(); + FREE_OP1(); UNDEF_RESULT(); HANDLE_EXCEPTION(); } @@ -8006,7 +8019,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 value of type %s", zend_zval_type_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); FREE_OP1(); HANDLE_EXCEPTION(); @@ -8022,7 +8035,7 @@ ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, CV|TMPVAR|UNUSED|CLASS_FETCH, ANY) scope = EX(func)->op_array.scope; if (UNEXPECTED(scope == NULL)) { SAVE_OPLINE(); - zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active", + zend_throw_error(NULL, "Cannot use \"%s\" in the global scope", fetch_type == ZEND_FETCH_CLASS_SELF ? "self" : fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static"); ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -8218,7 +8231,6 @@ ZEND_VM_HANDLER(183, ZEND_BIND_STATIC, CV, UNUSED, REF) zval *variable_ptr; variable_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_W); - i_zval_ptr_dtor(variable_ptr); ht = ZEND_MAP_PTR_GET(EX(func)->op_array.static_variables_ptr); if (!ht) { @@ -8239,10 +8251,11 @@ ZEND_VM_HANDLER(183, ZEND_BIND_STATIC, CV, UNUSED, REF) if (Z_TYPE_P(value) == IS_CONSTANT_AST) { SAVE_OPLINE(); if (UNEXPECTED(zval_update_constant_ex(value, EX(func)->op_array.scope) != SUCCESS)) { - ZVAL_NULL(variable_ptr); HANDLE_EXCEPTION(); } } + + i_zval_ptr_dtor(variable_ptr); if (UNEXPECTED(!Z_ISREF_P(value))) { zend_reference *ref = (zend_reference*)emalloc(sizeof(zend_reference)); GC_SET_REFCOUNT(ref, 2); @@ -8257,6 +8270,7 @@ ZEND_VM_HANDLER(183, ZEND_BIND_STATIC, CV, UNUSED, REF) ZVAL_REF(variable_ptr, Z_REF_P(value)); } } else { + i_zval_ptr_dtor(variable_ptr); ZVAL_COPY(variable_ptr, value); } @@ -8395,6 +8409,58 @@ ZEND_VM_COLD_CONSTCONST_HANDLER(188, ZEND_SWITCH_STRING, CONST|TMPVARCV, CONST, } } +ZEND_VM_COLD_CONSTCONST_HANDLER(195, ZEND_MATCH, CONST|TMPVARCV, CONST, JMP_ADDR) +{ + USE_OPLINE + zval *op, *jump_zv; + HashTable *jumptable; + + op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); + jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); + +ZEND_VM_C_LABEL(match_try_again): + if (Z_TYPE_P(op) == IS_LONG) { + jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); + } else if (Z_TYPE_P(op) == IS_STRING) { + jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), OP1_TYPE == IS_CONST); + } else if (Z_TYPE_P(op) == IS_REFERENCE) { + op = Z_REFVAL_P(op); + ZEND_VM_C_GOTO(match_try_again); + } else { + if (UNEXPECTED((OP1_TYPE & IS_CV) && Z_TYPE_P(op) == IS_UNDEF)) { + SAVE_OPLINE(); + op = ZVAL_UNDEFINED_OP1(); + if (UNEXPECTED(EG(exception))) { + HANDLE_EXCEPTION(); + } + ZEND_VM_C_GOTO(match_try_again); + } + + ZEND_VM_C_GOTO(default_branch); + } + + if (jump_zv != NULL) { + ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); + ZEND_VM_CONTINUE(); + } else { +ZEND_VM_C_LABEL(default_branch): + /* default */ + ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value); + ZEND_VM_CONTINUE(); + } +} + +ZEND_VM_COLD_CONST_HANDLER(197, ZEND_MATCH_ERROR, CONST|TMPVARCV, UNUSED) +{ + USE_OPLINE + zval *op; + + SAVE_OPLINE(); + op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); + zend_throw_exception_ex(zend_ce_unhandled_match_error, 0, "Unhandled match value of type %s", zend_zval_type_name(op)); + HANDLE_EXCEPTION(); +} + ZEND_VM_COLD_CONSTCONST_HANDLER(189, ZEND_IN_ARRAY, CONST|TMP|VAR|CV, CONST, NUM) { USE_OPLINE diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index e5dcadb0bfd47..5dcd4812e939c 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -765,7 +765,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_OP_SPEC_HAN if (UNEXPECTED(zend_fetch_static_property_address(&prop, &prop_info, (opline+1)->extended_value, BP_VAR_RW, 0 OPLINE_CC EXECUTE_DATA_CC) != SUCCESS)) { UNDEF_RESULT(); - FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var); + FREE_OP((opline+1)->op1_type, (opline+1)->op1.var); HANDLE_EXCEPTION(); } @@ -903,8 +903,8 @@ static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_us SAVE_OPLINE(); zend_throw_error(NULL, "Cannot use temporary expression in write context"); - FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op2_type, opline->op2.var); + FREE_OP(opline->op1_type, opline->op1.var); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -915,8 +915,8 @@ static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_us SAVE_OPLINE(); zend_throw_error(NULL, "Cannot use [] for reading"); - FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op2_type, opline->op2.var); + FREE_OP(opline->op1_type, opline->op1.var); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -1054,7 +1054,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_STATIC_PROP_REF_SPEC_HA SAVE_OPLINE(); if (zend_fetch_static_property_address(&prop, &prop_info, opline->extended_value & ~ZEND_RETURNS_FUNCTION, BP_VAR_W, 0 OPLINE_CC EXECUTE_DATA_CC) != SUCCESS) { - FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var); + FREE_OP((opline+1)->op1_type, (opline+1)->op1.var); UNDEF_RESULT(); HANDLE_EXCEPTION(); } @@ -1794,7 +1794,7 @@ static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_ca SAVE_OPLINE(); zend_throw_error(NULL, "Cannot pass parameter %d by reference", arg_num); - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op1_type, opline->op1.var); arg = ZEND_CALL_VAR(EX(call), opline->result.var); ZVAL_UNDEF(arg); HANDLE_EXCEPTION(); @@ -1968,7 +1968,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_ARRAY_SPEC_HANDLER(ZEND_O } } zend_type_error("call_user_func_array(): Argument #2 ($args) must be of type array, %s given", zend_zval_type_name(args)); - FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); + FREE_OP(opline->op2_type, opline->op2.var); FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); } else { @@ -2228,7 +2228,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP if (UNEXPECTED(ce == NULL)) { ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(opline, opline->op2)), Z_STR_P(RT_CONSTANT(opline, opline->op2) + 1), ZEND_FETCH_CLASS_DEFAULT | ZEND_FETCH_CLASS_EXCEPTION); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); } /*CACHE_PTR(opline->extended_value, ce);*/ @@ -2236,7 +2236,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_UNSET_STATIC_PROP } else if (opline->op2_type == IS_UNUSED) { ce = zend_fetch_class(NULL, opline->op2.num); if (UNEXPECTED(ce == NULL)) { - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op1_type, opline->op1.var); HANDLE_EXCEPTION(); } } else { @@ -2621,8 +2621,8 @@ static zend_never_inline ZEND_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_yi SAVE_OPLINE(); zend_throw_error(NULL, "Cannot yield from finally in a force-closed generator"); - FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var); - FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var); + FREE_OP(opline->op2_type, opline->op2.var); + FREE_OP(opline->op1_type, opline->op1.var); UNDEF_RESULT(); HANDLE_EXCEPTION(); } @@ -5946,7 +5946,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -5960,7 +5960,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_CONS } CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); } else { - zend_throw_error(NULL, "Undefined class constant '%s::%s'", + zend_throw_error(NULL, "Undefined constant %s::%s", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -6496,6 +6496,47 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPE } } +static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MATCH_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op, *jump_zv; + HashTable *jumptable; + + op = RT_CONSTANT(opline, opline->op1); + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); + +match_try_again: + if (Z_TYPE_P(op) == IS_LONG) { + jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); + } else if (Z_TYPE_P(op) == IS_STRING) { + jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), IS_CONST == IS_CONST); + } else if (Z_TYPE_P(op) == IS_REFERENCE) { + op = Z_REFVAL_P(op); + goto match_try_again; + } else { + if (UNEXPECTED((IS_CONST & IS_CV) && Z_TYPE_P(op) == IS_UNDEF)) { + SAVE_OPLINE(); + op = ZVAL_UNDEFINED_OP1(); + if (UNEXPECTED(EG(exception))) { + HANDLE_EXCEPTION(); + } + goto match_try_again; + } + + goto default_branch; + } + + if (jump_zv != NULL) { + ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); + ZEND_VM_CONTINUE(); + } else { +default_branch: + /* default */ + ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value); + ZEND_VM_CONTINUE(); + } +} + static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IN_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -9237,6 +9278,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE ZEND_VM_RETURN(); } +static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MATCH_ERROR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op; + + SAVE_OPLINE(); + op = RT_CONSTANT(opline, opline->op1); + zend_throw_exception_ex(zend_ce_unhandled_match_error, 0, "Unhandled match value of type %s", zend_zval_type_name(op)); + HANDLE_EXCEPTION(); +} + static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -11350,6 +11402,47 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SWITCH_STRING_SPEC_TMPVARCV_CO } } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MATCH_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op, *jump_zv; + HashTable *jumptable; + + op = EX_VAR(opline->op1.var); + jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); + +match_try_again: + if (Z_TYPE_P(op) == IS_LONG) { + jump_zv = zend_hash_index_find(jumptable, Z_LVAL_P(op)); + } else if (Z_TYPE_P(op) == IS_STRING) { + jump_zv = zend_hash_find_ex(jumptable, Z_STR_P(op), (IS_TMP_VAR|IS_VAR|IS_CV) == IS_CONST); + } else if (Z_TYPE_P(op) == IS_REFERENCE) { + op = Z_REFVAL_P(op); + goto match_try_again; + } else { + if (UNEXPECTED(((IS_TMP_VAR|IS_VAR|IS_CV) & IS_CV) && Z_TYPE_P(op) == IS_UNDEF)) { + SAVE_OPLINE(); + op = ZVAL_UNDEFINED_OP1(); + if (UNEXPECTED(EG(exception))) { + HANDLE_EXCEPTION(); + } + goto match_try_again; + } + + goto default_branch; + } + + if (jump_zv != NULL) { + ZEND_VM_SET_RELATIVE_OPCODE(opline, Z_LVAL_P(jump_zv)); + ZEND_VM_CONTINUE(); + } else { +default_branch: + /* default */ + ZEND_VM_SET_RELATIVE_OPCODE(opline, opline->extended_value); + ZEND_VM_CONTINUE(); + } +} + static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -12666,6 +12759,17 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_R_SPEC_TMPVARCV_TMP ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op; + + SAVE_OPLINE(); + op = EX_VAR(opline->op1.var); + zend_throw_exception_ex(zend_ce_unhandled_match_error, 0, "Unhandled match value of type %s", zend_zval_type_name(op)); + HANDLE_EXCEPTION(); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_LIST_R_SPEC_TMPVARCV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -13351,7 +13455,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 value of type %s", zend_zval_type_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); zval_ptr_dtor_nogc(EX_VAR(opline->op1.var)); HANDLE_EXCEPTION(); @@ -13367,7 +13471,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_TMPVAR_H scope = EX(func)->op_array.scope; if (UNEXPECTED(scope == NULL)) { SAVE_OPLINE(); - zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active", + zend_throw_error(NULL, "Cannot use \"%s\" in the global scope", fetch_type == ZEND_FETCH_CLASS_SELF ? "self" : fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static"); ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -17922,6 +18026,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HA ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); + op2 = RT_CONSTANT(opline, opline->op2); + result = fast_is_identical_function(op1, op2); + + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -18723,6 +18841,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HAND ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -18738,6 +18870,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_ ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_var_deref(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 @@ -19073,6 +19219,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_TYPE_SPEC_TMP_UNUSED_HANDL ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_tmp(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { #if 0 @@ -20943,6 +21103,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HA ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); + op2 = RT_CONSTANT(opline, opline->op2); + result = fast_is_identical_function(op1, op2); + + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -22060,7 +22234,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -22173,7 +22346,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -22287,7 +22459,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -22401,7 +22572,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -22783,7 +22953,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -22797,7 +22967,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_VAR_ } CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); } else { - zend_throw_error(NULL, "Undefined class constant '%s::%s'", + zend_throw_error(NULL, "Undefined constant %s::%s", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -24326,7 +24496,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -24439,7 +24608,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -24553,7 +24721,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -24667,7 +24834,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMPVAR_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -25357,6 +25523,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HAND ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_tmp(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -25427,6 +25607,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HAND ZEND_VM_SMART_BRANCH(result, 1); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_var_deref(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + zval_ptr_dtor_nogc(EX_VAR(opline->op2.var)); + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -25670,7 +25864,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -25783,7 +25976,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -25897,7 +26089,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -26011,7 +26202,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_OP_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -26669,6 +26859,20 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_TYPE_SPEC_VAR_UNUSED_HANDL ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CASE_STRICT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zval *op1, *op2; + zend_bool result; + + SAVE_OPLINE(); + op1 = _get_zval_ptr_var_deref(opline->op1.var EXECUTE_DATA_CC); + op2 = _get_zval_ptr_cv_deref_BP_VAR_R(opline->op2.var EXECUTE_DATA_CC); + result = fast_is_identical_function(op1, op2); + + ZEND_VM_SMART_BRANCH(result, 1); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_OBJ_OP_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -27771,7 +27975,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -27884,7 +28087,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -27998,7 +28200,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -28112,7 +28313,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_OP_DATA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -29075,7 +29275,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 value of type %s", zend_zval_type_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -29091,7 +29291,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_UNUSED_H scope = EX(func)->op_array.scope; if (UNEXPECTED(scope == NULL)) { SAVE_OPLINE(); - zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active", + zend_throw_error(NULL, "Cannot use \"%s\" in the global scope", fetch_type == ZEND_FETCH_CLASS_SELF ? "self" : fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static"); ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -30727,7 +30927,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS c = Z_PTR_P(zv); scope = EX(func)->op_array.scope; if (!zend_verify_const_access(c, scope)) { - zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Cannot access %s constant %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); } @@ -30741,7 +30941,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_CONSTANT_SPEC_UNUS } CACHE_POLYMORPHIC_PTR(opline->extended_value, ce, value); } else { - zend_throw_error(NULL, "Undefined class constant '%s::%s'", + zend_throw_error(NULL, "Undefined constant %s::%s", ZSTR_VAL(ce->name), Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -36719,7 +36919,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 value of type %s", zend_zval_type_name(op)); ZVAL_UNDEF(EX_VAR(opline->result.var)); HANDLE_EXCEPTION(); @@ -36735,7 +36935,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_CV_HANDL scope = EX(func)->op_array.scope; if (UNEXPECTED(scope == NULL)) { SAVE_OPLINE(); - zend_throw_error(NULL, "Cannot use \"%s\" when no class scope is active", + zend_throw_error(NULL, "Cannot use \"%s\" in the global scope", fetch_type == ZEND_FETCH_CLASS_SELF ? "self" : fetch_type == ZEND_FETCH_CLASS_PARENT ? "parent" : "static"); ZVAL_UNDEF(EX_VAR(opline->result.var)); @@ -38826,7 +39026,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -38939,7 +39138,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -39053,7 +39251,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -39167,7 +39364,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_OP_DA } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -42302,7 +42498,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -42415,7 +42610,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -42529,7 +42723,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -42643,7 +42836,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMPVAR_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -44105,7 +44297,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -44218,7 +44409,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -44332,7 +44522,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -44446,7 +44635,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_D } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -45037,7 +45225,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_UNUSED_HAN zval *variable_ptr; variable_ptr = EX_VAR(opline->op1.var); - i_zval_ptr_dtor(variable_ptr); ht = ZEND_MAP_PTR_GET(EX(func)->op_array.static_variables_ptr); if (!ht) { @@ -45058,10 +45245,11 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_UNUSED_HAN if (Z_TYPE_P(value) == IS_CONSTANT_AST) { SAVE_OPLINE(); if (UNEXPECTED(zval_update_constant_ex(value, EX(func)->op_array.scope) != SUCCESS)) { - ZVAL_NULL(variable_ptr); HANDLE_EXCEPTION(); } } + + i_zval_ptr_dtor(variable_ptr); if (UNEXPECTED(!Z_ISREF_P(value))) { zend_reference *ref = (zend_reference*)emalloc(sizeof(zend_reference)); GC_SET_REFCOUNT(ref, 2); @@ -45076,6 +45264,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_UNUSED_HAN ZVAL_REF(variable_ptr, Z_REF_P(value)); } } else { + i_zval_ptr_dtor(variable_ptr); ZVAL_COPY(variable_ptr, value); } @@ -47108,7 +47297,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CONST == IS_CV) { @@ -47221,7 +47409,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_TMP_VAR == IS_CV) { @@ -47335,7 +47522,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var)); zend_cannot_add_element(); goto assign_dim_error; } else if (IS_VAR == IS_CV) { @@ -47449,7 +47635,6 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_OP_DATA_ } variable_ptr = zend_hash_next_index_insert(Z_ARRVAL_P(object_ptr), value); if (UNEXPECTED(variable_ptr == NULL)) { - zend_cannot_add_element(); goto assign_dim_error; } else if (IS_CV == IS_CV) { @@ -50870,6 +51055,41 @@ ZEND_API void execute_ex(zend_execute_data *ex) (void*)&&ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR_LABEL, (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV_LABEL, + (void*)&&ZEND_MATCH_SPEC_CONST_CONST_LABEL, + (void*)&&ZEND_MATCH_SPEC_TMPVARCV_CONST_LABEL, + (void*)&&ZEND_MATCH_SPEC_TMPVARCV_CONST_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_MATCH_SPEC_TMPVARCV_CONST_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_TMP_CONST_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_TMP_TMP_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_TMP_VAR_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_TMP_CV_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_VAR_CONST_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_VAR_TMP_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_VAR_VAR_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_CASE_STRICT_SPEC_VAR_CV_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_MATCH_ERROR_SPEC_CONST_UNUSED_LABEL, + (void*)&&ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_LABEL, + (void*)&&ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_LABEL, (void*)&&ZEND_RECV_NOTYPE_SPEC_LABEL, (void*)&&ZEND_JMP_FORWARD_SPEC_LABEL, (void*)&&ZEND_NULL_LABEL, @@ -52522,6 +52742,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_SWITCH_STRING_SPEC_CONST_CONST) ZEND_SWITCH_STRING_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_MATCH_SPEC_CONST_CONST): + VM_TRACE(ZEND_MATCH_SPEC_CONST_CONST) + ZEND_MATCH_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IN_ARRAY_SPEC_CONST_CONST): VM_TRACE(ZEND_IN_ARRAY_SPEC_CONST_CONST) ZEND_IN_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -52782,6 +53006,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_YIELD_SPEC_CONST_UNUSED) ZEND_YIELD_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_MATCH_ERROR_SPEC_CONST_UNUSED): + VM_TRACE(ZEND_MATCH_ERROR_SPEC_CONST_UNUSED) + ZEND_MATCH_ERROR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_COUNT_SPEC_CONST_UNUSED): VM_TRACE(ZEND_COUNT_SPEC_CONST_UNUSED) ZEND_COUNT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -52970,6 +53198,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST) ZEND_SWITCH_STRING_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_MATCH_SPEC_TMPVARCV_CONST): + VM_TRACE(ZEND_MATCH_SPEC_TMPVARCV_CONST) + ZEND_MATCH_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST): VM_TRACE(ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -53298,6 +53530,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_FETCH_LIST_R_SPEC_TMPVARCV_TMPVAR) ZEND_FETCH_LIST_R_SPEC_TMPVARCV_TMPVAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED): + VM_TRACE(ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) + ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_FETCH_LIST_R_SPEC_TMPVARCV_CV): VM_TRACE(ZEND_FETCH_LIST_R_SPEC_TMPVARCV_CV) ZEND_FETCH_LIST_R_SPEC_TMPVARCV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -53787,6 +54023,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_IDENTICAL_SPEC_TMP_CONST) ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_TMP_CONST): + VM_TRACE(ZEND_CASE_STRICT_SPEC_TMP_CONST) + ZEND_CASE_STRICT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST): VM_TRACE(ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST) ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -53855,10 +54095,18 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_IDENTICAL_SPEC_TMP_TMP) ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_TMP_TMP): + VM_TRACE(ZEND_CASE_STRICT_SPEC_TMP_TMP) + ZEND_CASE_STRICT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP): VM_TRACE(ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP) ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_TMP_VAR): + VM_TRACE(ZEND_CASE_STRICT_SPEC_TMP_VAR) + ZEND_CASE_STRICT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED): VM_TRACE(ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED) ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -53883,6 +54131,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_GET_TYPE_SPEC_TMP_UNUSED) ZEND_GET_TYPE_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_TMP_CV): + VM_TRACE(ZEND_CASE_STRICT_SPEC_TMP_CV) + ZEND_CASE_STRICT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV): VM_TRACE(ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV) ZEND_FETCH_DIM_FUNC_ARG_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -54100,6 +54352,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_IDENTICAL_SPEC_VAR_CONST) ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_VAR_CONST): + VM_TRACE(ZEND_CASE_STRICT_SPEC_VAR_CONST) + ZEND_CASE_STRICT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST): VM_TRACE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST) ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -54364,6 +54620,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_IDENTICAL_SPEC_VAR_TMP) ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_VAR_TMP): + VM_TRACE(ZEND_CASE_STRICT_SPEC_VAR_TMP) + ZEND_CASE_STRICT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP): VM_TRACE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP) ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -54380,6 +54640,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_IS_IDENTICAL_SPEC_VAR_VAR) ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_VAR_VAR): + VM_TRACE(ZEND_CASE_STRICT_SPEC_VAR_VAR) + ZEND_CASE_STRICT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR): VM_TRACE(ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR) ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -54464,6 +54728,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_GET_TYPE_SPEC_VAR_UNUSED) ZEND_GET_TYPE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_CASE_STRICT_SPEC_VAR_CV): + VM_TRACE(ZEND_CASE_STRICT_SPEC_VAR_CV) + ZEND_CASE_STRICT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_ASSIGN_OBJ_OP_SPEC_VAR_CV): VM_TRACE(ZEND_ASSIGN_OBJ_OP_SPEC_VAR_CV) ZEND_ASSIGN_OBJ_OP_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -58414,6 +58682,41 @@ void zend_vm_init(void) ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR_HANDLER, ZEND_NULL_HANDLER, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV_HANDLER, + ZEND_MATCH_SPEC_CONST_CONST_HANDLER, + ZEND_MATCH_SPEC_TMPVARCV_CONST_HANDLER, + ZEND_MATCH_SPEC_TMPVARCV_CONST_HANDLER, + ZEND_NULL_HANDLER, + ZEND_MATCH_SPEC_TMPVARCV_CONST_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_CASE_STRICT_SPEC_TMP_CONST_HANDLER, + ZEND_CASE_STRICT_SPEC_TMP_TMP_HANDLER, + ZEND_CASE_STRICT_SPEC_TMP_VAR_HANDLER, + ZEND_NULL_HANDLER, + ZEND_CASE_STRICT_SPEC_TMP_CV_HANDLER, + ZEND_CASE_STRICT_SPEC_VAR_CONST_HANDLER, + ZEND_CASE_STRICT_SPEC_VAR_TMP_HANDLER, + ZEND_CASE_STRICT_SPEC_VAR_VAR_HANDLER, + ZEND_NULL_HANDLER, + ZEND_CASE_STRICT_SPEC_VAR_CV_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_NULL_HANDLER, + ZEND_MATCH_ERROR_SPEC_CONST_UNUSED_HANDLER, + ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_HANDLER, + ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_HANDLER, + ZEND_NULL_HANDLER, + ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED_HANDLER, ZEND_RECV_NOTYPE_SPEC_HANDLER, ZEND_JMP_FORWARD_SPEC_HANDLER, ZEND_NULL_HANDLER, @@ -59515,7 +59818,10 @@ void zend_vm_init(void) 2284, 2285 | SPEC_RULE_OP1, 2290 | SPEC_RULE_OP1 | SPEC_RULE_OP2, - 3218 + 2315 | SPEC_RULE_OP1, + 2320 | SPEC_RULE_OP1 | SPEC_RULE_OP2, + 2345 | SPEC_RULE_OP1, + 3253 }; #if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) zend_opcode_handler_funcs = labels; @@ -59680,7 +59986,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2317 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2352 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -59688,7 +59994,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2342 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2377 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -59696,7 +60002,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2367 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2402 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -59707,17 +60013,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2392 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2427 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2417 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2452 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2442 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2477 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_MUL: @@ -59728,17 +60034,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2467 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2502 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2492 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2527 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2517 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2552 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_IDENTICAL: @@ -59749,14 +60055,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2542 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2577 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2617 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2652 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 2842 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2877 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_IDENTICAL: @@ -59767,14 +60073,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2692 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2727 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2767 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2802 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 2847 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2882 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_EQUAL: @@ -59785,12 +60091,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2542 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2577 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2617 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2652 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_EQUAL: @@ -59801,12 +60107,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2692 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2727 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2767 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2802 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_SMALLER: @@ -59814,12 +60120,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2852 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 2887 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2927 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 2962 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_IS_SMALLER_OR_EQUAL: @@ -59827,74 +60133,74 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3002 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3037 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3077 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3112 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_QM_ASSIGN: if (op1_info == MAY_BE_LONG) { - spec = 3164 | SPEC_RULE_OP1; + spec = 3199 | SPEC_RULE_OP1; } else if (op1_info == MAY_BE_DOUBLE) { - spec = 3169 | SPEC_RULE_OP1; + spec = 3204 | SPEC_RULE_OP1; } else if ((op->op1_type == IS_CONST) ? !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1)) : (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) { - spec = 3174 | SPEC_RULE_OP1; + spec = 3209 | SPEC_RULE_OP1; } break; case ZEND_PRE_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3152 | SPEC_RULE_RETVAL; + spec = 3187 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3154 | SPEC_RULE_RETVAL; + spec = 3189 | SPEC_RULE_RETVAL; } break; case ZEND_PRE_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3156 | SPEC_RULE_RETVAL; + spec = 3191 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3158 | SPEC_RULE_RETVAL; + spec = 3193 | SPEC_RULE_RETVAL; } break; case ZEND_POST_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3160; + spec = 3195; } else if (op1_info == MAY_BE_LONG) { - spec = 3161; + spec = 3196; } break; case ZEND_POST_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3162; + spec = 3197; } else if (op1_info == MAY_BE_LONG) { - spec = 3163; + spec = 3198; } break; case ZEND_JMP: if (OP_JMP_ADDR(op, op->op1) > op) { - spec = 2316; + spec = 2351; } break; case ZEND_RECV: if (op->op2.num == MAY_BE_ANY) { - spec = 2315; + spec = 2350; } break; case ZEND_SEND_VAL: if (op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3214; + spec = 3249; } break; case ZEND_SEND_VAR_EX: if (op->op2.num <= MAX_ARG_FLAG_NUM && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3209 | SPEC_RULE_OP1; + spec = 3244 | SPEC_RULE_OP1; } break; case ZEND_FE_FETCH_R: if (op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) { - spec = 3216 | SPEC_RULE_RETVAL; + spec = 3251 | SPEC_RULE_RETVAL; } break; case ZEND_FETCH_DIM_R: @@ -59902,17 +60208,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3179 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 3214 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_SEND_VAL_EX: if (op->op2.num <= MAX_ARG_FLAG_NUM && op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3215; + spec = 3250; } break; case ZEND_SEND_VAR: if ((op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3204 | SPEC_RULE_OP1; + spec = 3239 | SPEC_RULE_OP1; } break; case ZEND_BW_OR: diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 8c13337f65012..ae1da5d2e88c8 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -494,28 +494,6 @@ "TMPVARCV" => "???", ); -$op1_free_unfetched = array( - "ANY" => "FREE_UNFETCHED_OP(opline->op1_type, opline->op1.var)", - "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))", - "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))", - "CONST" => "", - "UNUSED" => "", - "CV" => "", - "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op1.var))", - "TMPVARCV" => "???", -); - -$op2_free_unfetched = array( - "ANY" => "FREE_UNFETCHED_OP(opline->op2_type, opline->op2.var)", - "TMP" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))", - "VAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))", - "CONST" => "", - "UNUSED" => "", - "CV" => "", - "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR(opline->op2.var))", - "TMPVARCV" => "???", -); - $op_data_type = array( "ANY" => "(opline+1)->op1_type", "TMP" => "IS_TMP_VAR", @@ -582,17 +560,6 @@ "TMPVARCV" => "???", ); -$op_data_free_unfetched = array( - "ANY" => "FREE_UNFETCHED_OP((opline+1)->op1_type, (opline+1)->op1.var)", - "TMP" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))", - "VAR" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))", - "CONST" => "", - "UNUSED" => "", - "CV" => "", - "TMPVAR" => "zval_ptr_dtor_nogc(EX_VAR((opline+1)->op1.var))", - "TMPVARCV" => "???", -); - $list = array(); // list of opcode handlers and helpers in original order $opcodes = array(); // opcode handlers by code $helpers = array(); // opcode helpers by name @@ -786,8 +753,6 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec=null) "/FREE_OP2_IF_VAR\(\)/" => $op2_free_op_if_var[$op2], "/FREE_OP1_VAR_PTR\(\)/" => $op1_free_op_var_ptr[$op1], "/FREE_OP2_VAR_PTR\(\)/" => $op2_free_op_var_ptr[$op2], - "/FREE_UNFETCHED_OP1\(\)/" => $op1_free_unfetched[$op1], - "/FREE_UNFETCHED_OP2\(\)/" => $op2_free_unfetched[$op2], "/\!ZEND_VM_SPEC/m" => ($op1!="ANY"||$op2!="ANY")?"0":"1", "/ZEND_VM_SPEC/m" => ($op1!="ANY"||$op2!="ANY")?"1":"0", "/ZEND_VM_C_LABEL\(\s*([A-Za-z_]*)\s*\)/m" => "\\1".(($spec && $kind != ZEND_VM_KIND_CALL)?("_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec)):""), @@ -802,7 +767,6 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec=null) "/GET_OP_DATA_ZVAL_PTR_PTR\(([^)]*)\)/" => $op_data_get_zval_ptr_ptr[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"], "/FREE_OP_DATA\(\)/" => $op_data_free_op[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"], "/FREE_OP_DATA_VAR_PTR\(\)/" => $op_data_free_op_var_ptr[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"], - "/FREE_UNFETCHED_OP_DATA\(\)/" => $op_data_free_unfetched[isset($extra_spec['OP_DATA']) ? $extra_spec['OP_DATA'] : "ANY"], "/RETURN_VALUE_USED\(opline\)/" => isset($extra_spec['RETVAL']) ? $extra_spec['RETVAL'] : "RETURN_VALUE_USED(opline)", "/arg_num <= MAX_ARG_FLAG_NUM/" => isset($extra_spec['QUICK_ARG']) ? $extra_spec['QUICK_ARG'] : "arg_num <= MAX_ARG_FLAG_NUM", "/ZEND_VM_SMART_BRANCH\(\s*([^,)]*)\s*,\s*([^)]*)\s*\)/" => isset($extra_spec['SMART_BRANCH']) ? diff --git a/Zend/zend_vm_handlers.h b/Zend/zend_vm_handlers.h index e5d50a408304e..2b27b4e057874 100644 --- a/Zend/zend_vm_handlers.h +++ b/Zend/zend_vm_handlers.h @@ -1287,498 +1287,514 @@ _(2311, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ _(2312, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_TMPVAR) \ _(2314, ZEND_ARRAY_KEY_EXISTS_SPEC_CV_CV) \ - _(2315, ZEND_RECV_NOTYPE_SPEC) \ - _(2316, ZEND_JMP_FORWARD_SPEC) \ - _(2322, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2323, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2324, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2326, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2327, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2328, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2329, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2331, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2337, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2338, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2339, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2341, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2347, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2348, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2349, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2351, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2352, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2353, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2354, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2356, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2362, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2363, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2364, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2366, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2372, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2373, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2374, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2376, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2377, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2378, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2379, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2381, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2387, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2388, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2389, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2391, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2393, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2394, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2396, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2397, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2398, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2399, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2401, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2402, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2403, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2404, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2406, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2412, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2413, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2414, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2416, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2418, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2419, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2421, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2422, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2423, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2424, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2426, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2427, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2428, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2429, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2431, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2437, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2438, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2439, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2441, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2443, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2444, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2446, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2447, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2448, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2449, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2451, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2452, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2453, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2454, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2456, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2462, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2463, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2464, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2466, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2472, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2473, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2474, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2476, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2477, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2478, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2479, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2481, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2487, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2488, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2489, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2491, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2497, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2498, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2499, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2501, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2502, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2503, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2504, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2506, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2512, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2513, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2514, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2516, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2522, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2523, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2524, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2526, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2527, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2528, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2529, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2531, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2537, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2538, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2539, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2541, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2557, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2558, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2559, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2560, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2561, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2562, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2563, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2564, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2565, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2569, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2570, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2571, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2572, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2573, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2574, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2575, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2576, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2577, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2578, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2579, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2580, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2584, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2585, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2586, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2602, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2603, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2604, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2605, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2606, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2607, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2608, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2609, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2610, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2614, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2615, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2616, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2632, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2633, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2634, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2635, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2636, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2637, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2638, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2639, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2640, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2644, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2645, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2646, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2647, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2648, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2649, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2650, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2651, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2652, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2653, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2654, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2655, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2659, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2660, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2661, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2677, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2678, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2679, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2680, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2681, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2682, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2683, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2684, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2685, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2689, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2690, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2691, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2707, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2708, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2709, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2710, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2711, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2712, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2713, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2714, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2715, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2719, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2720, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2721, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2722, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2723, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2724, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2725, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2726, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2727, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2728, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2729, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2730, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2734, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2735, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2736, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2752, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2753, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2754, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2755, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2756, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2757, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2758, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2759, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2760, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2764, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2765, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2766, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2782, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2783, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2784, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2785, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2786, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2787, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2788, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2789, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2790, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2794, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2795, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2796, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2797, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2798, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2799, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2800, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2801, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2802, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2803, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2804, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2805, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2809, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2810, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2811, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2827, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2828, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2829, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2830, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2831, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2832, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2833, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2834, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2835, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2839, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2840, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2841, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2842, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(2846, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(2847, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(2851, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(2855, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(2856, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2857, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2858, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(2859, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2860, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2864, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(2865, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2866, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2867, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(2868, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2869, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2870, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2871, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2872, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2873, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2874, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2875, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2879, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2880, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2881, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2882, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(2883, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2884, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2885, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2886, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2887, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2888, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2889, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2890, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2894, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2895, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2896, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2912, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(2913, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2914, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2915, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2916, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2917, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2918, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2919, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2920, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2924, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2925, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2926, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2930, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2931, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2932, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2933, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2934, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2935, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2939, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2940, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(2941, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(2942, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2943, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2944, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2945, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2946, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2947, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2948, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2949, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2950, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2954, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2955, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2956, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2957, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2958, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2959, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2960, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2961, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2962, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2963, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2964, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2965, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2969, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2970, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2971, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2987, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2988, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2989, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2990, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2991, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2992, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2993, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2994, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2995, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2999, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3000, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3001, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3005, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3006, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3007, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3008, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3009, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3010, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3014, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3015, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3016, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3017, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3018, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3019, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3020, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3021, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3022, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3023, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3024, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3025, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3029, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3030, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3031, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3032, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3033, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3034, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3035, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3036, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3037, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3038, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3039, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3040, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3044, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3045, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3046, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3062, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3063, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3064, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3065, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3066, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3067, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3068, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3069, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3070, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3074, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3075, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3076, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3080, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3081, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3082, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3083, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3084, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3085, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3089, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3090, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3091, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3092, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3093, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3094, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3095, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3096, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3097, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3098, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3099, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3100, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3104, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3105, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3106, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3107, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3108, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3109, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3110, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3111, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3112, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3113, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3114, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3115, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3119, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3120, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3121, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3137, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3138, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3139, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3140, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3141, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3142, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3143, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3144, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3145, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3149, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3150, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3151, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3152, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3153, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3154, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3155, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ - _(3156, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3157, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3158, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3159, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ - _(3160, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3161, ZEND_POST_INC_LONG_SPEC_CV) \ - _(3162, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3163, ZEND_POST_DEC_LONG_SPEC_CV) \ - _(3164, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ - _(3165, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3166, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3168, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3169, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ - _(3170, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3171, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3173, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3174, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ - _(3175, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3176, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3178, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3180, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3181, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3183, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3184, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ - _(3185, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3186, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3188, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3189, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ - _(3190, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3191, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3193, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3199, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ - _(3200, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3201, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3203, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3206, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ - _(3208, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ - _(3211, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR) \ - _(3213, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV) \ - _(3214, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ - _(3215, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ - _(3216, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ - _(3217, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ - _(3217+1, ZEND_NULL) + _(2315, ZEND_MATCH_SPEC_CONST_CONST) \ + _(2316, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2317, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2319, ZEND_MATCH_SPEC_TMPVARCV_CONST) \ + _(2325, ZEND_CASE_STRICT_SPEC_TMP_CONST) \ + _(2326, ZEND_CASE_STRICT_SPEC_TMP_TMP) \ + _(2327, ZEND_CASE_STRICT_SPEC_TMP_VAR) \ + _(2329, ZEND_CASE_STRICT_SPEC_TMP_CV) \ + _(2330, ZEND_CASE_STRICT_SPEC_VAR_CONST) \ + _(2331, ZEND_CASE_STRICT_SPEC_VAR_TMP) \ + _(2332, ZEND_CASE_STRICT_SPEC_VAR_VAR) \ + _(2334, ZEND_CASE_STRICT_SPEC_VAR_CV) \ + _(2345, ZEND_MATCH_ERROR_SPEC_CONST_UNUSED) \ + _(2346, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2347, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2349, ZEND_MATCH_ERROR_SPEC_TMPVARCV_UNUSED) \ + _(2350, ZEND_RECV_NOTYPE_SPEC) \ + _(2351, ZEND_JMP_FORWARD_SPEC) \ + _(2357, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2358, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2359, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2361, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2362, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2363, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2364, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2366, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2372, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2373, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2374, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2376, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2382, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2383, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2384, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2386, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2387, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2388, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2389, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2391, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2397, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2398, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2399, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2401, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2407, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2408, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2409, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2411, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2412, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2413, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2414, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2416, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2422, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2423, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2424, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2426, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2428, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2429, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2431, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2432, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2433, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2434, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2436, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2437, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2438, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2439, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2441, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2447, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2448, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2449, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2451, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2453, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2454, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2456, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2457, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2458, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2459, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2461, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2462, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2463, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2464, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2466, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2472, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2473, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2474, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2476, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2478, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2479, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2481, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2482, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2483, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2484, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2486, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2487, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2488, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2489, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2491, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2497, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2498, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2499, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2501, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2507, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2508, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2509, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2511, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2512, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2513, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2514, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2516, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2522, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2523, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2524, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2526, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2532, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2533, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2534, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2536, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2537, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2538, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2539, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2541, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2547, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2548, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2549, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2551, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2557, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2558, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2559, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2561, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2562, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2563, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2564, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2566, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2572, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2573, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2574, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2576, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2592, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2593, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2594, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2595, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2596, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2597, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2598, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2599, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2600, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2604, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2605, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2606, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2607, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2608, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2609, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2610, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2611, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2612, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2613, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2614, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2615, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2619, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2620, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2621, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2637, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2638, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2639, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2640, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2641, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2642, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2643, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2644, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2645, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2649, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2650, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2651, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2667, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2668, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2669, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2670, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2671, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2672, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2673, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2674, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2675, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2679, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2680, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2681, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2682, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2683, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2684, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2685, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2686, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2687, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2688, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2689, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2690, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2694, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2695, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2696, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2712, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2713, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2714, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2715, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2716, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2717, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2718, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2719, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2720, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2724, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2725, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2726, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2742, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2743, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2744, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2745, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2746, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2747, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2748, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2749, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2750, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2754, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2755, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2756, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2757, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2758, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2759, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2760, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2761, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2762, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2763, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2764, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2765, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2769, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2770, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2771, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2787, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2788, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2789, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2790, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2791, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2792, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2793, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2794, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2795, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2799, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2800, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2801, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2817, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2818, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2819, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2820, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2821, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2822, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2823, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2824, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2825, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2829, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2830, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2831, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2832, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2833, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2834, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2835, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2836, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2837, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2838, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2839, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2840, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2844, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2845, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2846, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2862, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2863, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2864, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2865, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2866, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2867, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2868, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2869, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2870, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2874, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2875, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2876, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2877, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(2881, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(2882, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(2886, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(2890, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(2891, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2892, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2893, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(2894, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2895, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2899, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(2900, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2901, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2902, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(2903, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2904, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2905, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2906, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2907, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2908, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2909, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2910, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2914, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2915, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2916, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2917, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(2918, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2919, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2920, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2921, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2922, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2923, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2924, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2925, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2929, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2930, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2931, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2947, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(2948, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2949, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2950, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2951, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2952, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2953, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2954, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2955, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2959, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2960, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2961, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2965, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2966, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2967, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2968, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2969, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2970, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2974, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2975, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(2976, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(2977, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2978, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2979, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2980, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2981, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2982, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2983, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2984, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2985, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2989, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2990, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2991, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2992, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2993, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2994, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2995, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2996, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2997, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2998, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2999, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3000, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3004, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3005, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3006, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3022, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3023, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3024, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3025, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3026, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3027, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3028, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3029, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3030, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3034, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3035, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3036, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3040, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3041, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3042, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3043, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3044, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3045, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3049, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3050, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3051, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3052, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3053, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3054, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3055, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3056, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3057, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3058, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3059, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3060, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3064, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3065, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3066, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3067, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3068, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3069, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3070, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3071, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3072, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3073, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3074, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3075, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3079, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3080, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3081, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3097, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3098, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3099, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3100, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3101, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3102, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3103, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3104, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3105, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3109, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3110, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3111, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3115, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3116, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3117, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3118, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3119, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3120, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3124, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3125, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3126, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3127, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3128, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3129, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3130, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3131, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3132, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3133, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3134, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3135, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3139, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3140, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3141, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3142, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3143, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3144, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3145, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3146, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3147, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3148, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3149, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3150, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3154, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3155, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3156, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3172, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3173, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3174, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3175, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3176, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3177, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3178, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3179, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3180, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3184, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3185, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3186, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3187, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3188, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3189, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3190, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ + _(3191, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3192, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3193, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3194, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ + _(3195, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3196, ZEND_POST_INC_LONG_SPEC_CV) \ + _(3197, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3198, ZEND_POST_DEC_LONG_SPEC_CV) \ + _(3199, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ + _(3200, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3201, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3203, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3204, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ + _(3205, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3206, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3208, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3209, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ + _(3210, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3211, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3213, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3215, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3216, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3218, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3219, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ + _(3220, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3221, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3223, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3224, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ + _(3225, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3226, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3228, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3234, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ + _(3235, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3236, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3238, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3241, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ + _(3243, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ + _(3246, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR) \ + _(3248, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV) \ + _(3249, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ + _(3250, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ + _(3251, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ + _(3252, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ + _(3252+1, ZEND_NULL) diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c index 65733779e490e..e51e476be30d4 100644 --- a/Zend/zend_vm_opcodes.c +++ b/Zend/zend_vm_opcodes.c @@ -22,7 +22,7 @@ #include #include -static const char *zend_vm_opcodes_names[195] = { +static const char *zend_vm_opcodes_names[198] = { "ZEND_NOP", "ZEND_ADD", "ZEND_SUB", @@ -218,9 +218,12 @@ static const char *zend_vm_opcodes_names[195] = { "ZEND_GET_CALLED_CLASS", "ZEND_GET_TYPE", "ZEND_ARRAY_KEY_EXISTS", + "ZEND_MATCH", + "ZEND_CASE_STRICT", + "ZEND_MATCH_ERROR", }; -static uint32_t zend_vm_opcodes_flags[195] = { +static uint32_t zend_vm_opcodes_flags[198] = { 0x00000000, 0x00000b0b, 0x00000b0b, @@ -416,6 +419,9 @@ static uint32_t zend_vm_opcodes_flags[195] = { 0x00000101, 0x00000103, 0x00000707, + 0x0300030b, + 0x00000301, + 0x0000010b, }; ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) { diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h index 60bcb66643e8b..b196404060311 100644 --- a/Zend/zend_vm_opcodes.h +++ b/Zend/zend_vm_opcodes.h @@ -271,7 +271,10 @@ END_EXTERN_C() #define ZEND_GET_CALLED_CLASS 192 #define ZEND_GET_TYPE 193 #define ZEND_ARRAY_KEY_EXISTS 194 +#define ZEND_MATCH 195 +#define ZEND_CASE_STRICT 196 +#define ZEND_MATCH_ERROR 197 -#define ZEND_VM_LAST_OPCODE 194 +#define ZEND_VM_LAST_OPCODE 197 #endif diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c index 1f6f921ab77be..ec3d81fbb0a6a 100644 --- a/Zend/zend_weakrefs.c +++ b/Zend/zend_weakrefs.c @@ -236,9 +236,7 @@ static void zend_weakref_free(zend_object *zo) { ZEND_COLD ZEND_METHOD(WeakReference, __construct) { - zend_throw_error(NULL, - "Direct instantiation of 'WeakReference' is not allowed, " - "use WeakReference::create instead"); + zend_throw_error(NULL, "Direct instantiation of WeakReference is not allowed, use WeakReference::create instead"); } ZEND_METHOD(WeakReference, create) diff --git a/azure/apt.yml b/azure/apt.yml index 2beb625f620c0..8e51d8062965f 100644 --- a/azure/apt.yml +++ b/azure/apt.yml @@ -7,6 +7,9 @@ steps: sudo apt install bison \ re2c \ locales \ + ldap-utils \ + openssl \ + slapd \ language-pack-de \ re2c \ libgmp-dev \ @@ -29,7 +32,6 @@ steps: libpq-dev \ libreadline-dev \ libldap2-dev \ - libsasl2-dev \ libsodium-dev \ libargon2-0-dev \ postgresql \ diff --git a/azure/setup-slapd.sh b/azure/setup-slapd.sh new file mode 100755 index 0000000000000..72a509f7e07f1 --- /dev/null +++ b/azure/setup-slapd.sh @@ -0,0 +1,169 @@ +#!/bin/sh +set -ev + +# Create TLS certificate +sudo mkdir -p /etc/ldap/ssl + +alt_names() { + ( + ( + (hostname && hostname -a && hostname -A && hostname -f) | + xargs -n 1 | + sort -u | + sed -e 's/\(\S\+\)/DNS:\1/g' + ) && ( + (hostname -i && hostname -I && echo "127.0.0.1 ::1") | + xargs -n 1 | + sort -u | + sed -e 's/\(\S\+\)/IP:\1/g' + ) + ) | paste -d, -s +} + +sudo openssl req -newkey rsa:4096 -x509 -nodes -days 3650 \ + -out /etc/ldap/ssl/server.crt -keyout /etc/ldap/ssl/server.key \ + -subj "/C=US/ST=Arizona/L=Localhost/O=localhost/CN=localhost" \ + -addext "subjectAltName = `alt_names`" + +sudo chown -R openldap:openldap /etc/ldap/ssl + +# Display the TLS certificate (should be world readable) +openssl x509 -noout -text -in /etc/ldap/ssl/server.crt + +# Point to the certificate generated +if ! grep -q 'TLS_CACERT \/etc\/ldap\/ssl\/server.crt' /etc/ldap/ldap.conf; then + sudo sed -e 's|^\s*TLS_CACERT|# TLS_CACERT|' -i /etc/ldap/ldap.conf + echo 'TLS_CACERT /etc/ldap/ssl/server.crt' | sudo tee -a /etc/ldap/ldap.conf +fi + +# Configure LDAP protocols to serve. +sudo sed -e 's|^\s*SLAPD_SERVICES\s*=.*$|SLAPD_SERVICES="ldap:/// ldaps:/// ldapi:///"|' -i /etc/default/slapd + +# Configure LDAP database. +DBDN=`sudo ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// -b cn=config '(&(olcRootDN=*)(olcSuffix=*))' dn | grep -i '^dn:' | sed -e 's/^dn:\s*//'`; + +sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/ppolicy.ldif + +sudo service slapd restart + +sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF +dn: $DBDN +changetype: modify +replace: olcSuffix +olcSuffix: dc=my-domain,dc=com +- +replace: olcRootDN +olcRootDN: cn=Manager,dc=my-domain,dc=com +- +replace: olcRootPW +olcRootPW: secret + +dn: cn=config +changetype: modify +add: olcTLSCACertificateFile +olcTLSCACertificateFile: /etc/ldap/ssl/server.crt +- +add: olcTLSCertificateFile +olcTLSCertificateFile: /etc/ldap/ssl/server.crt +- +add: olcTLSCertificateKeyFile +olcTLSCertificateKeyFile: /etc/ldap/ssl/server.key +- +add: olcTLSVerifyClient +olcTLSVerifyClient: never +- +add: olcAuthzRegexp +olcAuthzRegexp: uid=usera,cn=digest-md5,cn=auth cn=usera,dc=my-domain,dc=com +- +replace: olcLogLevel +olcLogLevel: -1 + +dn: cn=module{0},cn=config +changetype: modify +add: olcModuleLoad +olcModuleLoad: sssvlv +- +add: olcModuleLoad +olcModuleLoad: ppolicy +- +add: olcModuleLoad +olcModuleLoad: dds +EOF + +sudo service slapd restart + +sudo ldapadd -Q -Y EXTERNAL -H ldapi:/// << EOF +dn: olcOverlay=sssvlv,$DBDN +objectClass: olcOverlayConfig +objectClass: olcSssVlvConfig +olcOverlay: sssvlv +olcSssVlvMax: 10 +olcSssVlvMaxKeys: 5 + +dn: olcOverlay=ppolicy,$DBDN +objectClass: olcOverlayConfig +objectClass: olcPPolicyConfig +olcOverlay: ppolicy +### This would clutter our DIT and make tests to fail, while ppolicy does not +### seem to work as we expect (it does not seem to provide expected controls) +## olcPPolicyDefault: cn=default,ou=pwpolicies,dc=my-domain,dc=com +## olcPPolicyHashCleartext: FALSE +## olcPPolicyUseLockout: TRUE + +dn: olcOverlay=dds,$DBDN +objectClass: olcOverlayConfig +objectClass: olcDdsConfig +olcOverlay: dds +EOF + +sudo service slapd restart + +sudo ldapmodify -Q -Y EXTERNAL -H ldapi:/// << EOF +dn: $DBDN +changetype: modify +add: olcDbIndex +olcDbIndex: entryExpireTimestamp eq +EOF + +sudo service slapd restart + +ldapadd -H ldapi:/// -D cn=Manager,dc=my-domain,dc=com -w secret < --EXPECTF-- -bzopen(): Argument #2 ($mode) must be either 'r' or 'w' +bzopen(): Argument #2 ($mode) must be either "r" or "w" Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) Warning: bzopen(): Filename cannot be empty in %s on line %d bool(false) -bzopen(): Argument #2 ($mode) must be either 'r' or 'w' -bzopen(): Argument #2 ($mode) must be either 'r' or 'w' +bzopen(): Argument #2 ($mode) must be either "r" or "w" +bzopen(): Argument #2 ($mode) must be either "r" or "w" Warning: bzopen(no_such_file): Failed to open stream: No such file or directory in %s on line %d bool(false) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 3efcacdb2cb51..b3c9f4eeb2260 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -107,7 +107,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free) size_t len; if (zend_hash_num_elements(Z_ARRVAL_P(key)) != 2) { - zend_argument_error(NULL, 1, "must have exactly two elements: 'key' and 'name'"); + zend_argument_error(NULL, 1, "must have exactly two elements: \"key\" and \"name\""); return 0; } zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(key), &pos); diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt index 1871ce9cad865..c493351de107e 100644 --- a/ext/dba/tests/dba013.phpt +++ b/ext/dba/tests/dba013.phpt @@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc'); --EXPECTF-- database handler: %s -Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d +Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" in %s.php:%d Stack trace: #0 %sdba013.php(6): dba_insert(Array, '%s', Resource id #%d) #1 {main} diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt index 2b7c2b7b25b0b..ef59f9fedc29b 100644 --- a/ext/dba/tests/dba014.phpt +++ b/ext/dba/tests/dba014.phpt @@ -24,7 +24,7 @@ require(__DIR__ .'/clean.inc'); --EXPECTF-- database handler: %s -Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: 'key' and 'name' in %s.php:%d +Fatal error: Uncaught Error: dba_insert(): Argument #1 ($key) must have exactly two elements: "key" and "name" in %s.php:%d Stack trace: #0 %sdba014.php(6): dba_insert(Array, '%s', Resource id #%d) #1 {main} diff --git a/ext/dom/document.c b/ext/dom/document.c index d16a085463eeb..6ff1750137187 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2054,7 +2054,7 @@ PHP_METHOD(DOMDocument, registerNodeClass) RETURN_TRUE; } - zend_argument_error(NULL, 2, "must be a class name derived from %s or null, '%s' given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name)); + zend_argument_error(NULL, 2, "must be a class name derived from %s or null, %s given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name)); } /* }}} */ diff --git a/ext/dom/tests/bug47430.phpt b/ext/dom/tests/bug47430.phpt index 2d5733fe31562..33aaa235e83a8 100644 --- a/ext/dom/tests/bug47430.phpt +++ b/ext/dom/tests/bug47430.phpt @@ -25,8 +25,8 @@ print_r($arr); ?> --EXPECT-- -Attempt to assign property 'nodeValue' on null -Attempt to assign property 'nodeValue' on null +Attempt to assign property "nodeValue" on null +Attempt to assign property "nodeValue" on null Array ( [0] => Value diff --git a/ext/dom/tests/bug67949.phpt b/ext/dom/tests/bug67949.phpt index f6a12b9812426..529dee04be48e 100644 --- a/ext/dom/tests/bug67949.phpt +++ b/ext/dom/tests/bug67949.phpt @@ -62,7 +62,7 @@ bool(false) testing property access string(4) "data" -Warning: Attempt to read property 'textContent' on null in %s on line %d +Warning: Attempt to read property "textContent" on null in %s on line %d NULL testing offset not a long array(1) { @@ -70,7 +70,7 @@ array(1) { string(4) "test" } -Warning: Attempt to read property 'textContent' on null in %s on line %d +Warning: Attempt to read property "textContent" on null in %s on line %d bool(false) NULL array(1) { diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index 22a11f692d692..6eac3a04a4632 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -312,7 +312,7 @@ static ffi_type *zend_ffi_make_fake_struct_type(zend_ffi_type *type) /* {{{ */ case ZEND_FFI_TYPE_DOUBLE: t->elements[i] = &ffi_type_double; break; -#ifndef PHP_WIN32 +#ifdef HAVE_LONG_DOUBLE case ZEND_FFI_TYPE_LONGDOUBLE: t->elements[i] = &ffi_type_longdouble; break; @@ -359,7 +359,7 @@ static ffi_type *zend_ffi_get_type(zend_ffi_type *type) /* {{{ */ return &ffi_type_float; case ZEND_FFI_TYPE_DOUBLE: return &ffi_type_double; -#ifndef PHP_WIN32 +#ifdef HAVE_LONG_DOUBLE case ZEND_FFI_TYPE_LONGDOUBLE: return &ffi_type_longdouble; #endif @@ -3448,7 +3448,7 @@ static void zend_ffi_throw_parser_error(const char *format, ...) /* {{{ */ static int zend_ffi_validate_vla(zend_ffi_type *type) /* {{{ */ { if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { - zend_ffi_throw_parser_error("'[*]' not allowed in other than function prototype scope at line %d", FFI_G(line)); + zend_ffi_throw_parser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); return FAILURE; } return SUCCESS; @@ -3465,11 +3465,11 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo ZEND_HASH_FOREACH_STR_KEY_PTR(FFI_G(tags), key, tag) { if (ZEND_FFI_TYPE(tag->type) == type) { if (type->kind == ZEND_FFI_TYPE_ENUM) { - zend_ffi_throw_parser_error("Incomplete 'enum %s' at line %d", ZSTR_VAL(key), FFI_G(line)); + zend_ffi_throw_parser_error("Incomplete enum \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); } else if (type->attr & ZEND_FFI_ATTR_UNION) { - zend_ffi_throw_parser_error("Incomplete 'union %s' at line %d", ZSTR_VAL(key), FFI_G(line)); + zend_ffi_throw_parser_error("Incomplete union \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); } else { - zend_ffi_throw_parser_error("Incomplete 'struct %s' at line %d", ZSTR_VAL(key), FFI_G(line)); + zend_ffi_throw_parser_error("Incomplete struct \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); } return FAILURE; } @@ -3481,7 +3481,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo ZEND_HASH_FOREACH_STR_KEY_PTR(FFI_G(symbols), key, sym) { if (type == ZEND_FFI_TYPE(sym->type)) { - zend_ffi_throw_parser_error("Incomplete C type '%s' at line %d", ZSTR_VAL(key), FFI_G(line)); + zend_ffi_throw_parser_error("Incomplete C type %s at line %d", ZSTR_VAL(key), FFI_G(line)); return FAILURE; } } ZEND_HASH_FOREACH_END(); @@ -3489,10 +3489,10 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo zend_ffi_throw_parser_error("Incomplete type at line %d", FFI_G(line)); return FAILURE; } else if (!allow_incomplete_array && (type->attr & ZEND_FFI_ATTR_INCOMPLETE_ARRAY)) { - zend_ffi_throw_parser_error("'[]' not allowed at line %d", FFI_G(line)); + zend_ffi_throw_parser_error("\"[]\" is not allowed at line %d", FFI_G(line)); return FAILURE; } else if (!FFI_G(allow_vla) && (type->attr & ZEND_FFI_ATTR_VLA)) { - zend_ffi_throw_parser_error("'[*]' not allowed in other than function prototype scope at line %d", FFI_G(line)); + zend_ffi_throw_parser_error("\"[*]\" is not allowed in other than function prototype scope at line %d", FFI_G(line)); return FAILURE; } return SUCCESS; @@ -3502,7 +3502,7 @@ static int zend_ffi_validate_incomplete_type(zend_ffi_type *type, zend_bool allo static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplete_tag, zend_bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_VOID) { - zend_ffi_throw_parser_error("'void' type is not allowed at line %d", FFI_G(line)); + zend_ffi_throw_parser_error("void type is not allowed at line %d", FFI_G(line)); return FAILURE; } return zend_ffi_validate_incomplete_type(type, allow_incomplete_tag, allow_incomplete_array); @@ -3512,7 +3512,7 @@ static int zend_ffi_validate_type(zend_ffi_type *type, zend_bool allow_incomplet static int zend_ffi_validate_var_type(zend_ffi_type *type, zend_bool allow_incomplete_array) /* {{{ */ { if (type->kind == ZEND_FFI_TYPE_FUNC) { - zend_ffi_throw_parser_error("'function' type is not allowed at line %d", FFI_G(line)); + zend_ffi_throw_parser_error("function type is not allowed at line %d", FFI_G(line)); return FAILURE; } return zend_ffi_validate_type(type, 0, allow_incomplete_array); @@ -4043,7 +4043,7 @@ ZEND_METHOD(FFI, arrayType) /* {{{ */ zend_throw_error(zend_ffi_exception_ce, "Only the leftmost array can be undimensioned"); RETURN_THROWS(); } else if (type->kind == ZEND_FFI_TYPE_VOID) { - zend_throw_error(zend_ffi_exception_ce, "Array of 'void' is not allowed"); + zend_throw_error(zend_ffi_exception_ce, "Array of void type is not allowed"); RETURN_THROWS(); } else if (type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG) { zend_throw_error(zend_ffi_exception_ce, "Array of incomplete type is not allowed"); @@ -4545,7 +4545,7 @@ static char *zend_ffi_parse_directives(const char *filename, char *code_pos, cha static ZEND_COLD zend_function *zend_fake_get_constructor(zend_object *object) /* {{{ */ { - zend_throw_error(NULL, "Instantiation of '%s' is not allowed", ZSTR_VAL(object->ce->name)); + zend_throw_error(NULL, "Instantiation of %s is not allowed", ZSTR_VAL(object->ce->name)); return NULL; } /* }}} */ @@ -5281,10 +5281,10 @@ static void zend_ffi_finalize_type(zend_ffi_dcl *dcl) /* {{{ */ case ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_COMPLEX: case ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_COMPLEX: case ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG|ZEND_FFI_DCL_COMPLEX: - zend_ffi_parser_error("unsupported type '_Complex' at line %d", FFI_G(line)); + zend_ffi_parser_error("Unsupported type _Complex at line %d", FFI_G(line)); break; default: - zend_ffi_parser_error("unsupported type specifier combination at line %d", FFI_G(line)); + zend_ffi_parser_error("Unsupported type specifier combination at line %d", FFI_G(line)); break; } dcl->flags &= ~ZEND_FFI_DCL_TYPE_SPECIFIERS; @@ -5332,7 +5332,7 @@ void zend_ffi_resolve_typedef(const char *name, size_t name_len, zend_ffi_dcl *d dcl->type = type; return; } - zend_ffi_parser_error("undefined C type '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Undefined C type \"%.*s\" at line %d", name_len, name, FFI_G(line)); } /* }}} */ @@ -5446,12 +5446,12 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name } value = val->u64; } else { - zend_ffi_parser_error("enumerator value '%.*s' must be an integer at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Enumerator value \"%.*s\" must be an integer at line %d", name_len, name, FFI_G(line)); return; } if (overflow) { - zend_ffi_parser_error("overflow in enumeration values '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Overflow in enumeration values \"%.*s\" at line %d", name_len, name, FFI_G(line)); return; } @@ -5495,7 +5495,7 @@ void zend_ffi_add_enum_val(zend_ffi_dcl *enum_dcl, const char *name, size_t name } sym = zend_hash_str_find_ptr(FFI_G(symbols), name, name_len); if (sym) { - zend_ffi_parser_error("redeclaration of '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line)); } else { sym = pemalloc(sizeof(zend_ffi_symbol), FFI_G(persistent)); sym->kind = ZEND_FFI_SYM_CONST; @@ -5597,7 +5597,7 @@ void zend_ffi_add_field(zend_ffi_dcl *struct_dcl, const char *name, size_t name_ if (!zend_hash_str_add_ptr(&struct_type->record.fields, name, name_len, field)) { zend_ffi_type_dtor(field->type); pefree(field, FFI_G(persistent)); - zend_ffi_parser_error("duplicate field name '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line)); } } /* }}} */ @@ -5614,7 +5614,7 @@ void zend_ffi_add_anonymous_field(zend_ffi_dcl *struct_dcl, zend_ffi_dcl *field_ field_type = ZEND_FFI_TYPE(field_dcl->type); if (field_type->kind != ZEND_FFI_TYPE_STRUCT) { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("declaration does not declare anything at line %d", FFI_G(line)); + zend_ffi_parser_error("Declaration does not declare anything at line %d", FFI_G(line)); return; } @@ -5651,7 +5651,7 @@ void zend_ffi_add_anonymous_field(zend_ffi_dcl *struct_dcl, zend_ffi_dcl *field_ if (!zend_hash_add_ptr(&struct_type->record.fields, key, new_field)) { zend_ffi_type_dtor(new_field->type); pefree(new_field, FFI_G(persistent)); - zend_ffi_parser_error("duplicate field name '%s' at line %d", ZSTR_VAL(key), FFI_G(line)); + zend_ffi_parser_error("Duplicate field name \"%s\" at line %d", ZSTR_VAL(key), FFI_G(line)); return; } } else { @@ -5686,37 +5686,37 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n if (field_type->kind < ZEND_FFI_TYPE_UINT8 || field_type->kind > ZEND_FFI_TYPE_BOOL) { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("wrong type of bit field '%.*s' at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Wrong type of bit field \"%.*s\" at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } if (bits->kind == ZEND_FFI_VAL_INT32 || bits->kind == ZEND_FFI_VAL_INT64) { if (bits->i64 < 0) { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("negative width in bit-field '%.*s' at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Negative width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } else if (bits->i64 == 0) { zend_ffi_cleanup_dcl(field_dcl); if (name) { - zend_ffi_parser_error("zero width in bit-field '%.*s' at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Zero width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } return; } else if (bits->i64 > field_type->size * 8) { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("width of '%.*s' exceeds its type at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Width of \"%.*s\" exceeds its type at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } } else if (bits->kind == ZEND_FFI_VAL_UINT32 || bits->kind == ZEND_FFI_VAL_UINT64) { if (bits->u64 == 0) { zend_ffi_cleanup_dcl(field_dcl); if (name) { - zend_ffi_parser_error("zero width in bit-field '%.*s' at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Zero width in bit-field \"%.*s\" at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } return; } else if (bits->u64 > field_type->size * 8) { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("width of '%.*s' exceeds its type at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Width of \"%.*s\" exceeds its type at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } } else { zend_ffi_cleanup_dcl(field_dcl); - zend_ffi_parser_error("bit field '%.*s' width not an integer constant at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); + zend_ffi_parser_error("Bit field \"%.*s\" width not an integer constant at line %d", name ? name_len : sizeof("")-1, name ? name : "", FFI_G(line)); } field = pemalloc(sizeof(zend_ffi_field), FFI_G(persistent)); @@ -5764,7 +5764,7 @@ void zend_ffi_add_bit_field(zend_ffi_dcl *struct_dcl, const char *name, size_t n if (!zend_hash_str_add_ptr(&struct_type->record.fields, name, name_len, field)) { zend_ffi_type_dtor(field->type); pefree(field, FFI_G(persistent)); - zend_ffi_parser_error("duplicate field name '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Duplicate field name \"%.*s\" at line %d", name_len, name, FFI_G(line)); } } else { zend_hash_next_index_insert_ptr(&struct_type->record.fields, field); @@ -5839,12 +5839,12 @@ void zend_ffi_make_array_type(zend_ffi_dcl *dcl, zend_ffi_val *len) /* {{{ */ length = len->ch; } else { zend_ffi_cleanup_dcl(dcl); - zend_ffi_parser_error("unsupported array index type at line %d", FFI_G(line)); + zend_ffi_parser_error("Unsupported array index type at line %d", FFI_G(line)); return; } if (length < 0) { zend_ffi_cleanup_dcl(dcl); - zend_ffi_parser_error("negative array index at line %d", FFI_G(line)); + zend_ffi_parser_error("Negative array index at line %d", FFI_G(line)); return; } @@ -5900,7 +5900,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n zend_ffi_cleanup_dcl(dcl); zend_hash_destroy(args); pefree(args, FFI_G(persistent)); - zend_ffi_parser_error("'void' type is not allowed at line %d", FFI_G(line)); + zend_ffi_parser_error("void type is not allowed at line %d", FFI_G(line)); return; } else { no_args = 1; @@ -5930,7 +5930,7 @@ void zend_ffi_make_func_type(zend_ffi_dcl *dcl, HashTable *args, zend_ffi_dcl *n zend_ffi_cleanup_dcl(dcl); zend_hash_destroy(args); pefree(args, FFI_G(persistent)); - zend_ffi_parser_error("'float'/'double' type not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line)); + zend_ffi_parser_error("Type float/double is not allowed at position " ZEND_ULONG_FMT " with __vectorcall at line %d", i+1, FFI_G(line)); return; } } ZEND_HASH_FOREACH_END(); @@ -6100,7 +6100,7 @@ void zend_ffi_declare(const char *name, size_t name_len, zend_ffi_dcl *dcl) /* { } } } - zend_ffi_parser_error("redeclaration of '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Redeclaration of \"%.*s\" at line %d", name_len, name, FFI_G(line)); } else { if ((dcl->flags & ZEND_FFI_DCL_STORAGE_CLASS) == ZEND_FFI_DCL_TYPEDEF) { if (zend_ffi_validate_vla(ZEND_FFI_TYPE(dcl->type)) != SUCCESS) { @@ -6165,26 +6165,26 @@ void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, if (dcl->flags & ZEND_FFI_DCL_STRUCT) { if (tag->kind != ZEND_FFI_TAG_STRUCT) { - zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); return; } else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) { - zend_ffi_parser_error("redefinition of 'struct %.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Redefinition of \"struct %.*s\" at line %d", name_len, name, FFI_G(line)); return; } } else if (dcl->flags & ZEND_FFI_DCL_UNION) { if (tag->kind != ZEND_FFI_TAG_UNION) { - zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); return; } else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) { - zend_ffi_parser_error("redefinition of 'union %.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Redefinition of \"union %.*s\" at line %d", name_len, name, FFI_G(line)); return; } } else if (dcl->flags & ZEND_FFI_DCL_ENUM) { if (tag->kind != ZEND_FFI_TAG_ENUM) { - zend_ffi_parser_error("'%.*s' defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("\"%.*s\" defined as wrong kind of tag at line %d", name_len, name, FFI_G(line)); return; } else if (!incomplete && !(type->attr & ZEND_FFI_ATTR_INCOMPLETE_TAG)) { - zend_ffi_parser_error("redefinition of 'enum %.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Redefinition of \"enum %.*s\" at line %d", name_len, name, FFI_G(line)); return; } } else { @@ -6231,7 +6231,7 @@ void zend_ffi_declare_tag(const char *name, size_t name_len, zend_ffi_dcl *dcl, void zend_ffi_set_abi(zend_ffi_dcl *dcl, uint16_t abi) /* {{{ */ { if (dcl->abi != ZEND_FFI_ABI_DEFAULT) { - zend_ffi_parser_error("multiple calling convention specifiers at line %d", FFI_G(line)); + zend_ffi_parser_error("Multiple calling convention specifiers at line %d", FFI_G(line)); } else { dcl->abi = abi; } @@ -6327,7 +6327,7 @@ void zend_ffi_add_attribute(zend_ffi_dcl *dcl, const char *name, size_t name_len dcl->attr |= ZEND_FFI_ATTR_GCC_STRUCT; break; case attr_unsupported: - zend_ffi_parser_error("unsupported attribute '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line)); break; default: /* ignore */ @@ -6382,7 +6382,7 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na && val->i64 == 3) { zend_ffi_set_abi(dcl, ZEND_FFI_ABI_REGISTER); } else { - zend_ffi_parser_error("incorrect 'regparam' value at line %d", FFI_G(line)); + zend_ffi_parser_error("Incorrect \"regparam\" value at line %d", FFI_G(line)); } break; case attr_aligned: @@ -6391,7 +6391,7 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na && val->i64 > 0 && val->i64 <= 0x80000000 && (val->i64 & (val->i64 - 1)) == 0) { dcl->align = val->i64; } else { - zend_ffi_parser_error("incorrect 'alignment' value at line %d", FFI_G(line)); + zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line)); } break; case attr_mode: @@ -6448,10 +6448,10 @@ void zend_ffi_add_attribute_value(zend_ffi_dcl *dcl, const char *name, size_t na } } } - zend_ffi_parser_error("unsupported 'mode' value at line %d", FFI_G(line)); + zend_ffi_parser_error("Unsupported \"mode\" value at line %d", FFI_G(line)); // TODO: ??? case attr_unsupported: - zend_ffi_parser_error("unsupported attribute '%.*s' at line %d", name_len, name, FFI_G(line)); + zend_ffi_parser_error("Unsupported attribute \"%.*s\" at line %d", name_len, name, FFI_G(line)); break; default: /* ignore */ @@ -6467,7 +6467,7 @@ void zend_ffi_add_msvc_attribute_value(zend_ffi_dcl *dcl, const char *name, size && val->i64 > 0 && val->i64 <= 0x80000000 && (val->i64 & (val->i64 - 1)) == 0) { dcl->align = val->i64; } else { - zend_ffi_parser_error("incorrect 'alignment' value at line %d", FFI_G(line)); + zend_ffi_parser_error("Incorrect \"alignment\" value at line %d", FFI_G(line)); } } else { /* ignore */ diff --git a/ext/ffi/tests/003.phpt b/ext/ffi/tests/003.phpt index efe88b31f356b..c65d76675708c 100644 --- a/ext/ffi/tests/003.phpt +++ b/ext/ffi/tests/003.phpt @@ -58,6 +58,6 @@ object(FFI\CData:struct _d)#%d (1) { ["x"]=> int(0) } -FFI\ParserException: Incomplete 'struct _e' at line 1 -FFI\ParserException: Incomplete 'struct _f' at line 1 +FFI\ParserException: Incomplete struct "_e" at line 1 +FFI\ParserException: Incomplete struct "_f" at line 1 ok diff --git a/ext/ffi/tests/004.phpt b/ext/ffi/tests/004.phpt index f5ad02098c016..f4d25f8287e74 100644 --- a/ext/ffi/tests/004.phpt +++ b/ext/ffi/tests/004.phpt @@ -82,6 +82,6 @@ object(FFI\CData:int32_t[2])#%d (2) { [1]=> int(0) } -FFI\ParserException: Incomplete 'enum _e' at line 1 -FFI\ParserException: Incomplete 'enum _f' at line 1 +FFI\ParserException: Incomplete enum "_e" at line 1 +FFI\ParserException: Incomplete enum "_f" at line 1 ok diff --git a/ext/ffi/tests/013.phpt b/ext/ffi/tests/013.phpt index cfc1e85eb03a3..af0bed9d016c7 100644 --- a/ext/ffi/tests/013.phpt +++ b/ext/ffi/tests/013.phpt @@ -57,8 +57,8 @@ try { int(1) int(2) int(3) -FFI\ParserException: 'void' type is not allowed at line 1 -FFI\ParserException: 'void' type is not allowed at line 1 +FFI\ParserException: void type is not allowed at line 1 +FFI\ParserException: void type is not allowed at line 1 FFI\ParserException: Function returning array is not allowed at line 1 FFI\ParserException: Array of functions is not allowed at line 1 FFI\ParserException: Function returning function is not allowed at line 1 diff --git a/ext/ffi/tests/015.phpt b/ext/ffi/tests/015.phpt index 7b710c1dc038f..86f6a0c3b6b7d 100644 --- a/ext/ffi/tests/015.phpt +++ b/ext/ffi/tests/015.phpt @@ -57,9 +57,9 @@ try { ?> ok --EXPECT-- -FFI\ParserException: Incomplete 'struct DIR' at line 1 +FFI\ParserException: Incomplete struct "DIR" at line 1 ok -FFI\ParserException: Incomplete 'struct DIR' at line 1 +FFI\ParserException: Incomplete struct "DIR" at line 1 ok ok ok diff --git a/ext/ffi/tests/016.phpt b/ext/ffi/tests/016.phpt index 2ca8363fbd9c1..b6aecf7634f9d 100644 --- a/ext/ffi/tests/016.phpt +++ b/ext/ffi/tests/016.phpt @@ -27,7 +27,7 @@ try { ?> ok --EXPECT-- -FFI\ParserException: 'function' type is not allowed at line 1 +FFI\ParserException: function type is not allowed at line 1 FFI\ParserException: Struct/union can't contain an instance of itself at line 1 ok ok diff --git a/ext/ffi/tests/017.phpt b/ext/ffi/tests/017.phpt index 02b917ff2b5fe..be915341eab41 100644 --- a/ext/ffi/tests/017.phpt +++ b/ext/ffi/tests/017.phpt @@ -24,7 +24,7 @@ try { ?> ok --EXPECTF-- -FFI\ParserException: 'function' type is not allowed at line 1 +FFI\ParserException: function type is not allowed at line 1 FFI\ParserException: Struct/union can't contain an instance of itself at line 1 object(FFI\CData:struct X)#%d (1) { ["ptr"]=> diff --git a/ext/ffi/tests/018.phpt b/ext/ffi/tests/018.phpt index f48367bc7107d..6f964f1c9bf49 100644 --- a/ext/ffi/tests/018.phpt +++ b/ext/ffi/tests/018.phpt @@ -21,6 +21,6 @@ try { ?> ok --EXPECT-- -FFI\ParserException: Incomplete 'struct X' at line 1 +FFI\ParserException: Incomplete struct "X" at line 1 ok ok diff --git a/ext/ffi/tests/027.phpt b/ext/ffi/tests/027.phpt index cc40798478b20..0ac2f3678866b 100644 --- a/ext/ffi/tests/027.phpt +++ b/ext/ffi/tests/027.phpt @@ -77,13 +77,13 @@ try { } ?> --EXPECT-- -FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1 -FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1 -FFI\ParserException: '[*]' not allowed in other than function prototype scope at line 1 +FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1 +FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1 +FFI\ParserException: "[*]" is not allowed in other than function prototype scope at line 1 ok FFI\Exception: Cannot instantiate FFI\CData of zero size -FFI\ParserException: '[]' not allowed at line 1 -FFI\ParserException: '[]' not allowed at line 1 +FFI\ParserException: "[]" is not allowed at line 1 +FFI\ParserException: "[]" is not allowed at line 1 ok ok ok diff --git a/ext/ffi/tests/043.phpt b/ext/ffi/tests/043.phpt index f4400a9adc913..8a6c299b6eeed 100644 --- a/ext/ffi/tests/043.phpt +++ b/ext/ffi/tests/043.phpt @@ -12,7 +12,7 @@ typedef unsigned int a; "); ?> --EXPECTF-- -Fatal error: Uncaught FFI\ParserException: redeclaration of 'a' at line 3 in %s043.php:2 +Fatal error: Uncaught FFI\ParserException: Redeclaration of "a" at line 3 in %s043.php:2 Stack trace: #0 %s043.php(2): FFI::cdef('%s') #1 {main} diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index 19a3fd9cd7f65..5eac52463428a 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -1062,7 +1062,7 @@ diff -u libmagic.orig/buffer.c libmagic/buffer.c diff -u libmagic.orig/cdf.c libmagic/cdf.c --- libmagic.orig/cdf.c 2019-02-20 03:35:27.000000000 +0100 -+++ libmagic/cdf.c 2020-04-07 22:25:10.517321000 +0200 ++++ libmagic/cdf.c 2020-05-05 20:05:37.698461100 +0200 @@ -43,7 +43,17 @@ #include #endif @@ -1395,7 +1395,7 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c (void)snprintf(buf, 26, "*Bad* %#16.16" INT64_T_FORMAT "x\n", diff -u libmagic.orig/compress.c libmagic/compress.c --- libmagic.orig/compress.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/compress.c 2020-04-07 22:25:10.517321000 +0200 ++++ libmagic/compress.c 2020-06-17 02:13:31.620121400 +0200 @@ -45,13 +45,11 @@ #endif #include @@ -1636,7 +1636,7 @@ diff -u libmagic.orig/encoding.c libmagic/encoding.c } diff -u libmagic.orig/file.h libmagic/file.h --- libmagic.orig/file.h 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/file.h 2020-04-22 20:15:46.790840100 +0200 ++++ libmagic/file.h 2020-06-21 00:23:48.421548900 +0200 @@ -33,18 +33,9 @@ #ifndef __file_h__ #define __file_h__ @@ -2212,7 +2212,7 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c case S_IFSOCK: diff -u libmagic.orig/funcs.c libmagic/funcs.c --- libmagic.orig/funcs.c 2019-05-07 04:27:11.000000000 +0200 -+++ libmagic/funcs.c 2020-04-14 17:15:50.737587100 +0200 ++++ libmagic/funcs.c 2020-06-17 02:13:31.651362400 +0200 @@ -31,87 +31,80 @@ #endif /* lint */ @@ -3048,7 +3048,7 @@ diff -u libmagic.orig/magic.c libmagic/magic.c public const char * magic_error(struct magic_set *ms) diff -u libmagic.orig/magic.h libmagic/magic.h ---- libmagic.orig/magic.h 2020-04-22 20:17:15.432186600 +0200 +--- libmagic.orig/magic.h 2020-07-08 18:10:37.403232400 +0200 +++ libmagic/magic.h 2020-04-07 22:25:10.548560600 +0200 @@ -124,6 +124,7 @@ @@ -3060,7 +3060,7 @@ diff -u libmagic.orig/magic.h libmagic/magic.h diff -u libmagic.orig/print.c libmagic/print.c --- libmagic.orig/print.c 2019-03-12 21:43:05.000000000 +0100 -+++ libmagic/print.c 2020-04-07 22:25:10.548560600 +0200 ++++ libmagic/print.c 2020-07-08 18:05:40.114527900 +0200 @@ -28,6 +28,7 @@ /* * print.c - debugging printout routines @@ -3108,7 +3108,7 @@ diff -u libmagic.orig/print.c libmagic/print.c - (void) fputc('\n', stderr); + + if (expanded_len >= 0 && expanded_format) { -+ php_error_docref(NULL, E_NOTICE, "Warning: %s", expanded_format); ++ php_error_docref(NULL, E_WARNING, "%s", expanded_format); + + free(expanded_format); + } @@ -3253,7 +3253,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c if (i != -1) diff -u libmagic.orig/softmagic.c libmagic/softmagic.c --- libmagic.orig/softmagic.c 2019-05-17 04:24:59.000000000 +0200 -+++ libmagic/softmagic.c 2020-04-07 22:25:10.548560600 +0200 ++++ libmagic/softmagic.c 2020-04-26 00:43:35.734037100 +0200 @@ -43,6 +43,10 @@ #include #include "der.h" diff --git a/ext/fileinfo/libmagic/print.c b/ext/fileinfo/libmagic/print.c index deb855d98e6d0..94ff571bd03ea 100644 --- a/ext/fileinfo/libmagic/print.c +++ b/ext/fileinfo/libmagic/print.c @@ -226,7 +226,7 @@ file_magwarn(struct magic_set *ms, const char *f, ...) va_end(va); if (expanded_len >= 0 && expanded_format) { - php_error_docref(NULL, E_NOTICE, "Warning: %s", expanded_format); + php_error_docref(NULL, E_WARNING, "%s", expanded_format); free(expanded_format); } diff --git a/ext/fileinfo/tests/bug61964-mb.phpt b/ext/fileinfo/tests/bug61964-mb.phpt index 0713ac2eb67ea..9187393554eb6 100644 --- a/ext/fileinfo/tests/bug61964-mb.phpt +++ b/ext/fileinfo/tests/bug61964-mb.phpt @@ -48,15 +48,15 @@ bool(false)%A resource(%d) of type (file_info) resource(%d) of type (file_info) bool(false)%A -Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964-mb.php on line %d +Warning: finfo_open(): offset `string' invalid in %sbug61964-mb.php on line %d -Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964-mb.php on line %d +Warning: finfo_open(): offset ` Core' invalid in %sbug61964-mb.php on line %d -Notice: finfo_open(): Warning: offset ` Me' invalid in %sbug61964-mb.php on line %d +Warning: finfo_open(): offset ` Me' invalid in %sbug61964-mb.php on line %d -Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964-mb.php on line %d +Warning: finfo_open(): offset `a' invalid in %sbug61964-mb.php on line %d -Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964-mb.php on line %d +Warning: finfo_open(): offset `b' invalid in %sbug61964-mb.php on line %d Warning: finfo_open(): Failed to load magic database at '%sbug61964-mb'. in %sbug61964-mb.php on line %d DONE: testing dir with files diff --git a/ext/fileinfo/tests/bug61964.phpt b/ext/fileinfo/tests/bug61964.phpt index 4d891e9731bea..24cf3bec8c807 100644 --- a/ext/fileinfo/tests/bug61964.phpt +++ b/ext/fileinfo/tests/bug61964.phpt @@ -48,15 +48,15 @@ bool(false)%A resource(%d) of type (file_info) resource(%d) of type (file_info) bool(false)%A -Notice: finfo_open(): Warning: offset `string' invalid in %sbug61964.php on line %d +Warning: finfo_open(): offset `string' invalid in %sbug61964.php on line %d -Notice: finfo_open(): Warning: offset ` Core' invalid in %sbug61964.php on line %d +Warning: finfo_open(): offset ` Core' invalid in %sbug61964.php on line %d -Notice: finfo_open(): Warning: offset ` Me' invalid in %sbug61964.php on line %d +Warning: finfo_open(): offset ` Me' invalid in %sbug61964.php on line %d -Notice: finfo_open(): Warning: offset `a' invalid in %sbug61964.php on line %d +Warning: finfo_open(): offset `a' invalid in %sbug61964.php on line %d -Notice: finfo_open(): Warning: offset `b' invalid in %sbug61964.php on line %d +Warning: finfo_open(): offset `b' invalid in %sbug61964.php on line %d Warning: finfo_open(): Failed to load magic database at '%sbug61964'. in %sbug61964.php on line %d DONE: testing dir with files diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 4b9ab706fb745..fea2c54041d2d 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -34,7 +34,7 @@ Warning: finfo_open(%sfoobarfile): Failed to open stream: No such file or direct Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error.php on line %d bool(false) -Notice: finfo_open(): Warning: using regular magic file `%smagic' in %sfinfo_open_error.php on line %d +Warning: finfo_open(): using regular magic file `%smagic' in %sfinfo_open_error.php on line %d resource(6) of type (file_info) finfo_open(): Argument #1 ($options) must be of type int, string given finfo::__construct(): Argument #1 ($options) must be of type int, string given diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 8fe44def2b4fc..541d5f51e0e2b 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -33,7 +33,7 @@ if (PHP_GD != "no") { CHECK_LIB("User32.lib", "gd", PHP_GD); CHECK_LIB("Gdi32.lib", "gd", PHP_GD); - EXTENSION("gd", "gd.c", null, "-Iext/gd/libgd", "php_gd2.dll"); + EXTENSION("gd", "gd.c", null, "-Iext/gd/libgd"); ADD_SOURCES("ext/gd/libgd", "gd2copypal.c gd.c \ gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c \ gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c gdhelpers.c gd_io.c gd_io_dp.c \ @@ -43,6 +43,7 @@ if (PHP_GD != "no") { gd_crop.c gd_interpolation.c gd_matrix.c gd_bmp.c gd_tga.c", "gd"); AC_DEFINE('HAVE_LIBGD', 1, 'GD support'); ADD_FLAG("CFLAGS_GD", " \ +/D PHP_GD_EXPORTS=1 \ /D HAVE_GD_DYNAMIC_CTX_EX=1 \ /D HAVE_GD_BUNDLED=1 \ /D HAVE_GD_GD2 \ diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 7d415137bd3e8..eb35655f33a22 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -178,7 +178,7 @@ static zend_always_inline php_gd_image_object* php_gd_exgdimage_from_zobj_p(zend * Converts an extension GdImage instance contained within a zval into the gdImagePtr * for use with library APIs */ -static zend_always_inline gdImagePtr php_gd_libgdimageptr_from_zval_p(zval* zp) +PHP_GD_API gdImagePtr php_gd_libgdimageptr_from_zval_p(zval* zp) { return php_gd_exgdimage_from_zobj_p(Z_OBJ_P(zp))->image; } @@ -3488,28 +3488,28 @@ PHP_FUNCTION(imagecrop) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") -1)) != NULL) { rect.x = zval_get_long(tmp); } else { - zend_argument_value_error(2, "must have an 'x' key"); + zend_argument_value_error(2, "must have an \"x\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - zend_argument_value_error(2, "must have a 'y' key"); + zend_argument_value_error(2, "must have a \"y\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - zend_argument_value_error(2, "must have a 'width' key"); + zend_argument_value_error(2, "must have a \"width\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - zend_argument_value_error(2, "must have a 'height' key"); + zend_argument_value_error(2, "must have a \"height\" key"); RETURN_THROWS(); } @@ -3672,28 +3672,28 @@ PHP_FUNCTION(imageaffine) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "x", sizeof("x") - 1)) != NULL) { rect.x = zval_get_long(tmp); } else { - zend_argument_value_error(3, "must have an 'x' key"); + zend_argument_value_error(3, "must have an \"x\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "y", sizeof("y") - 1)) != NULL) { rect.y = zval_get_long(tmp); } else { - zend_argument_value_error(3, "must have a 'y' key"); + zend_argument_value_error(3, "must have a \"y\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "width", sizeof("width") - 1)) != NULL) { rect.width = zval_get_long(tmp); } else { - zend_argument_value_error(3, "must have a 'width' key"); + zend_argument_value_error(3, "must have a \"width\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(z_rect), "height", sizeof("height") - 1)) != NULL) { rect.height = zval_get_long(tmp); } else { - zend_argument_value_error(3, "must have a 'height' key"); + zend_argument_value_error(3, "must have a \"height\" key"); RETURN_THROWS(); } pRect = ▭ @@ -3736,14 +3736,14 @@ PHP_FUNCTION(imageaffinematrixget) if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "x", sizeof("x") - 1)) != NULL) { x = zval_get_double(tmp); } else { - zend_argument_value_error(2, "must have an 'x' key"); + zend_argument_value_error(2, "must have an \"x\" key"); RETURN_THROWS(); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(options), "y", sizeof("y") - 1)) != NULL) { y = zval_get_double(tmp); } else { - zend_argument_value_error(2, "must have a 'y' key"); + zend_argument_value_error(2, "must have a \"y\" key"); RETURN_THROWS(); } diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 32fba66165a1a..387346727621e 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -51,7 +51,11 @@ #define PHP_IMG_TGA 128 #ifdef PHP_WIN32 -# define PHP_GD_API __declspec(dllexport) +# ifdef PHP_GD_EXPORTS +# define PHP_GD_API __declspec(dllexport) +# else +# define PHP_GD_API __declspec(dllimport) +# endif #elif defined(__GNUC__) && __GNUC__ >= 4 # define PHP_GD_API __attribute__ ((visibility("default"))) #else @@ -77,7 +81,7 @@ PHP_MINIT_FUNCTION(gd); PHP_MSHUTDOWN_FUNCTION(gd); PHP_RSHUTDOWN_FUNCTION(gd); -PHP_GD_API int phpi_get_le_gd(void); +PHP_GD_API struct gdImageStruct *php_gd_libgdimageptr_from_zval_p(zval* zp); #else diff --git a/ext/hash/tests/new-context.phpt b/ext/hash/tests/new-context.phpt index d53ff066422b3..c62c721acbd2c 100644 --- a/ext/hash/tests/new-context.phpt +++ b/ext/hash/tests/new-context.phpt @@ -9,4 +9,4 @@ try { echo "Exception: {$e->getMessage()}\n"; } --EXPECT-- -Exception: Call to private HashContext::__construct() from invalid context +Exception: Call to private HashContext::__construct() from global scope diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt index d957b1182d3f1..df16ceafd02fd 100644 --- a/ext/intl/tests/breakiter___construct.phpt +++ b/ext/intl/tests/breakiter___construct.phpt @@ -10,7 +10,7 @@ ini_set("intl.error_level", E_WARNING); new IntlBreakIterator(); --EXPECTF-- -Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private IntlBreakIterator::__construct() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/json/config.w32 b/ext/json/config.w32 index e54a9caaf5415..9d7881118d7d9 100644 --- a/ext/json/config.w32 +++ b/ext/json/config.w32 @@ -2,15 +2,6 @@ EXTENSION('json', 'json.c', false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); -if (!FSO.FileExists("ext/json/json_scanner.c")) { - STDOUT.WriteLine("Generating ext/json/json_scanner.c"); - STDOUT.WriteLine(execute(PATH_PROG("re2c") + " -t ext/json/php_json_scanner_defs.h --no-generation-date -bci -o ext/json/json_scanner.c ext/json/json_scanner.re")); -} -if (!FSO.FileExists("ext/json/json_parser.tab.c")) { - STDOUT.WriteLine("Generating ext/json/json_parser.tab.c"); - STDOUT.WriteLine(execute(PATH_PROG("bison") + " --defines -l ext/json/json_parser.y -o ext/json/json_parser.tab.c")); -} - ADD_SOURCES(configure_module_dirname, "json_encoder.c json_parser.tab.c json_scanner.c", "json"); ADD_MAKEFILE_FRAGMENT(); diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index 8802d18439ddf..77df0eef6a572 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -241,10 +241,10 @@ static int php_json_parser_object_create(php_json_parser *parser, zval *object) { if (parser->scanner.options & PHP_JSON_OBJECT_AS_ARRAY) { array_init(object); - return SUCCESS; } else { - return object_init(object); + object_init(object); } + return SUCCESS; } static int php_json_parser_object_update(php_json_parser *parser, zval *object, zend_string *key, zval *zvalue) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 9a1624667effe..a7e6abacfbb7f 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -280,10 +280,11 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra int control_iscritical = 0, rc = LDAP_SUCCESS; char** ldap_attrs = NULL; LDAPSortKey** sort_keys = NULL; - zend_string *tmpstring = NULL; + zend_string *tmpstring = NULL, **tmpstrings1 = NULL, **tmpstrings2 = NULL; + size_t num_tmpstrings1 = 0, num_tmpstrings2 = 0; if ((val = zend_hash_str_find(Z_ARRVAL_P(array), "oid", sizeof("oid") - 1)) == NULL) { - php_error_docref(NULL, E_WARNING, "Control must have an oid key"); + php_error_docref(NULL, E_WARNING, "Control must have an \"oid\" key"); return -1; } @@ -394,7 +395,6 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra if (ber_flatten2(vrber, control_value, 0) == -1) { rc = -1; } - ber_free(vrber, 1); } } } @@ -416,6 +416,8 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra num_attribs = zend_hash_num_elements(Z_ARRVAL_P(tmp)); ldap_attrs = safe_emalloc((num_attribs+1), sizeof(char *), 0); + tmpstrings1 = safe_emalloc(num_attribs, sizeof(zend_string*), 0); + num_tmpstrings1 = 0; for (i = 0; iattributeType = ZSTR_VAL(tmpstring); + sort_keys[i]->attributeType = ZSTR_VAL(tmpstrings1[num_tmpstrings1]); + ++num_tmpstrings1; if ((tmp = zend_hash_str_find(Z_ARRVAL_P(sortkey), "oid", sizeof("oid") - 1)) != NULL) { - tmpstring = zval_get_string(tmp); + tmpstrings2[num_tmpstrings2] = zval_get_string(tmp); if (EG(exception)) { rc = -1; goto failure; } - sort_keys[i]->orderingRule = ZSTR_VAL(tmpstring); + sort_keys[i]->orderingRule = ZSTR_VAL(tmpstrings2[num_tmpstrings2]); + ++num_tmpstrings2; } else { sort_keys[i]->orderingRule = NULL; } @@ -588,6 +597,20 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra if (tmpstring != NULL) { zend_string_release(tmpstring); } + if (tmpstrings1 != NULL) { + int i; + for (i = 0; i < num_tmpstrings1; ++i) { + zend_string_release(tmpstrings1[i]); + } + efree(tmpstrings1); + } + if (tmpstrings2 != NULL) { + int i; + for (i = 0; i < num_tmpstrings2; ++i) { + zend_string_release(tmpstrings2[i]); + } + efree(tmpstrings2); + } if (control_value != NULL) { ber_memfree(control_value); control_value = NULL; @@ -4207,6 +4230,11 @@ PHP_FUNCTION(ldap_exop_passwd) lnewpw.bv_len > 0 ? &lnewpw : NULL, requestctrls, NULL, &msgid); + + if (requestctrls != NULL) { + efree(requestctrls); + } + if (rc != LDAP_SUCCESS ) { php_error_docref(NULL, E_WARNING, "Passwd modify extended operation failed: %s (%d)", ldap_err2string(rc), rc); RETURN_FALSE; diff --git a/ext/ldap/tests/CONFLICTS b/ext/ldap/tests/CONFLICTS new file mode 100644 index 0000000000000..c1142c3c5c383 --- /dev/null +++ b/ext/ldap/tests/CONFLICTS @@ -0,0 +1 @@ +ldap diff --git a/ext/ldap/tests/connect.inc b/ext/ldap/tests/connect.inc index bd6a144d2ebcb..e3a9d1c777dc4 100644 --- a/ext/ldap/tests/connect.inc +++ b/ext/ldap/tests/connect.inc @@ -9,8 +9,9 @@ $host = getenv("LDAP_TEST_HOST") ?: "localhost"; $port = getenv("LDAP_TEST_PORT") ?: 389; $base = getenv("LDAP_TEST_BASE") ?: "dc=my-domain,dc=com"; $user = getenv("LDAP_TEST_USER") ?: "cn=Manager,$base"; -$sasl_user = getenv("LDAP_TEST_SASL_USER") ?: "Manager"; $passwd = getenv("LDAP_TEST_PASSWD") ?: "secret"; +$sasl_user = getenv("LDAP_TEST_SASL_USER") ?: "userA"; +$sasl_passwd = getenv("LDAP_TEST_SASL_PASSWD") ?: "oops"; $protocol_version = getenv("LDAP_TEST_OPT_PROTOCOL_VERSION") ?: 3; $skip_on_bind_failure = getenv("LDAP_TEST_SKIP_BIND_FAILURE") ?: true; diff --git a/ext/ldap/tests/ldap_sasl_bind_basic.phpt b/ext/ldap/tests/ldap_sasl_bind_basic.phpt index d447572e09d92..3ab977b8543e2 100644 --- a/ext/ldap/tests/ldap_sasl_bind_basic.phpt +++ b/ext/ldap/tests/ldap_sasl_bind_basic.phpt @@ -17,9 +17,20 @@ Patrick Allaert +--CLEAN-- + --EXPECT-- bool(true) diff --git a/ext/ldap/tests/ldap_sasl_bind_error.phpt b/ext/ldap/tests/ldap_sasl_bind_error.phpt index eb68370ff686d..53a84eae1a90c 100644 --- a/ext/ldap/tests/ldap_sasl_bind_error.phpt +++ b/ext/ldap/tests/ldap_sasl_bind_error.phpt @@ -11,22 +11,33 @@ Patrick Allaert +--CLEAN-- + --EXPECTF-- Warning: ldap_sasl_bind(): Unable to bind to server: Invalid DN syntax in %s on line %d diff --git a/ext/ldap/tests/ldap_set_option_error.phpt b/ext/ldap/tests/ldap_set_option_error.phpt index 079c63577d503..5ef4c0b86b1d4 100644 --- a/ext/ldap/tests/ldap_set_option_error.phpt +++ b/ext/ldap/tests/ldap_set_option_error.phpt @@ -33,7 +33,7 @@ var_dump(ldap_set_option($link, 999999, 999999)); --EXPECTF-- bool(false) -Warning: ldap_set_option(): Control must have an oid key in %s on line %d +Warning: ldap_set_option(): Control must have an "oid" key in %s on line %d bool(false) Warning: ldap_set_option(): The array value must contain only arrays, where each array is a control in %s on line %d diff --git a/ext/libxml/tests/bug61367-read.phpt b/ext/libxml/tests/bug61367-read.phpt index 2dd8ca7c21ad5..959b404954bd7 100644 --- a/ext/libxml/tests/bug61367-read.phpt +++ b/ext/libxml/tests/bug61367-read.phpt @@ -58,6 +58,6 @@ Warning: DOMDocument::loadXML(): Failure to process entity file in Entity, line: Warning: DOMDocument::loadXML(): Entity 'file' not defined in Entity, line: 4 in %s on line %d -Warning: Attempt to read property 'firstChild' on null in %s on line %d +Warning: Attempt to read property "firstChild" on null in %s on line %d -Warning: Attempt to read property 'nodeValue' on null in %s on line %d +Warning: Attempt to read property "nodeValue" on null in %s on line %d diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 4f2533ada58a7..393cd44da4e0d 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1581,7 +1581,7 @@ PHP_FUNCTION(mb_substitute_character) RETURN_TRUE; } /* Invalid string value */ - zend_argument_value_error(1, "must be 'none', 'long', 'entity' or a valid codepoint"); + zend_argument_value_error(1, "must be \"none\", \"long\", \"entity\" or a valid codepoint"); RETURN_THROWS(); } /* Integer codepoint passed */ diff --git a/ext/mbstring/tests/mb_substitute_character.phpt b/ext/mbstring/tests/mb_substitute_character.phpt index 9848624e8abc3..325942f26b51b 100644 --- a/ext/mbstring/tests/mb_substitute_character.phpt +++ b/ext/mbstring/tests/mb_substitute_character.phpt @@ -42,4 +42,4 @@ string(4) "82a0" bool(true) string(6) "entity" string(20) "262378323636303b82a0" -mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint diff --git a/ext/mbstring/tests/mb_substitute_character_basic.phpt b/ext/mbstring/tests/mb_substitute_character_basic.phpt index d230dfd1866bd..dae63040140ff 100644 --- a/ext/mbstring/tests/mb_substitute_character_basic.phpt +++ b/ext/mbstring/tests/mb_substitute_character_basic.phpt @@ -38,4 +38,4 @@ bool(true) string(4) "none" bool(true) string(4) "long" -mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint 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 f601f2453d2f8..2435318eaa985 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_strict_types.phpt @@ -149,17 +149,17 @@ TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must b --uppercase FALSE-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, bool given --empty string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --mixed case string-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --heredoc-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithToString-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithToString given --instance of classWithoutToString-- diff --git a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt index e11be336ab423..64298b0d66288 100644 --- a/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt +++ b/ext/mbstring/tests/mb_substitute_character_variation_weak_types.phpt @@ -121,9 +121,9 @@ bool(true) --float -10.5-- ValueError: mb_substitute_character(): Argument #1 ($substitute_character) is not a valid codepoint --float 10.0e19-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --float -10.0e19-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --float .5-- bool(true) --empty array-- @@ -147,19 +147,19 @@ bool(true) --uppercase FALSE-- bool(true) --empty string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --empty string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string DQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --string SQ-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --mixed case string-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --heredoc-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithToString-- -ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be 'none', 'long', 'entity' or a valid codepoint +ValueError: mb_substitute_character(): Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint --instance of classWithoutToString-- TypeError: mb_substitute_character(): Argument #1 ($substitute_character) must be of type string|int|null, classWithoutToString given --undefined var-- diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 0d1c34d7fc599..ba1fdf8033ce5 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1179,7 +1179,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags return; } if (UNEXPECTED(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) { - zend_throw_error(NULL, "Class '%s' cannot be instantiated", ZSTR_VAL(ce->name)); + zend_throw_error(NULL, "Class %s cannot be instantiated", ZSTR_VAL(ce->name)); RETURN_THROWS(); } fetchtype = MYSQLI_ASSOC; diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt index bcfd239911654..346e3f864fab7 100644 --- a/ext/mysqli/tests/bug38003.phpt +++ b/ext/mysqli/tests/bug38003.phpt @@ -17,7 +17,7 @@ $DB = new DB(); echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s +Fatal error: Uncaught Error: Call to private DB::__construct() from global scope in %s Stack trace: #0 {main} thrown in %s diff --git a/ext/mysqli/tests/bug74968.phpt b/ext/mysqli/tests/bug74968.phpt index e3e971eb1fe8d..c009f864510ee 100644 --- a/ext/mysqli/tests/bug74968.phpt +++ b/ext/mysqli/tests/bug74968.phpt @@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc'); ?> ==DONE== --EXPECTF-- -Fatal error: Uncaught Error: Class 'test' cannot be instantiated in %sbug74968.php:%d +Fatal error: Uncaught Error: Class test cannot be instantiated in %sbug74968.php:%d Stack trace: #0 %sbug74968.php(%d): mysqli_result->fetch_object('test') #1 {main} diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index c3dde0e2f7c16..c97738efb511f 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -147,4 +147,4 @@ NULL mysqli_result object is already closed [0] mysqli_fetch_object(): Argument #3 ($params) must be of type array, string given in %s on line %d -Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d +Fatal error: Class "this_class_does_not_exist" not found in %s on line %d diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 564751a25bab8..c3eff52ed0220 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -138,4 +138,4 @@ NULL NULL mysqli_result object is already closed -Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d +Fatal error: Class "this_class_does_not_exist" not found in %s on line %d diff --git a/ext/oci8/oci8.stub.php b/ext/oci8/oci8.stub.php index e3ef6fb3cc6b9..cf870f8acb4b8 100644 --- a/ext/oci8/oci8.stub.php +++ b/ext/oci8/oci8.stub.php @@ -226,14 +226,6 @@ function oci_field_is_null($statement_resource, string|int $column_number_or_nam */ function ocicolumnisnull($statement_resource, string|int $column_number_or_name): bool {} -function oci_internal_debug(bool $mode): void {} - -/** - * @alias oci_internal_debug - * @deprecated - */ -function ociinternaldebug(bool $mode): void {} - /** * @param resource $statement_resource */ @@ -273,6 +265,7 @@ function ocifetch($statement_resource): bool {} /** * @param resource $statement_resource * @param array $result + * @deprecated */ function ocifetchinto($statement_resource, &$result, int $mode = OCI_NUM): int|false {} diff --git a/ext/oci8/oci8_arginfo.h b/ext/oci8/oci8_arginfo.h index 334e9d672c512..90aee86841266 100644 --- a/ext/oci8/oci8_arginfo.h +++ b/ext/oci8/oci8_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 9b7f698c1f9f099a392760d85d2bb85e17846f13 */ + * Stub hash: 157a4128645b816f23fb0bcbbb5860362f446cb3 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, statement_resource) @@ -188,12 +188,6 @@ ZEND_END_ARG_INFO() #define arginfo_ocicolumnisnull arginfo_oci_field_is_null -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_internal_debug, 0, 1, IS_VOID, 0) - ZEND_ARG_TYPE_INFO(0, mode, _IS_BOOL, 0) -ZEND_END_ARG_INFO() - -#define arginfo_ociinternaldebug arginfo_oci_internal_debug - ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_execute, 0, 1, _IS_BOOL, 0) ZEND_ARG_INFO(0, statement_resource) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "OCI_COMMIT_ON_SUCCESS") @@ -581,7 +575,6 @@ ZEND_FUNCTION(oci_field_precision); ZEND_FUNCTION(oci_field_type); ZEND_FUNCTION(oci_field_type_raw); ZEND_FUNCTION(oci_field_is_null); -ZEND_FUNCTION(oci_internal_debug); ZEND_FUNCTION(oci_execute); ZEND_FUNCTION(oci_cancel); ZEND_FUNCTION(oci_fetch); @@ -681,15 +674,13 @@ static const zend_function_entry ext_functions[] = { ZEND_DEP_FALIAS(ocicolumntyperaw, oci_field_type_raw, arginfo_ocicolumntyperaw) ZEND_FE(oci_field_is_null, arginfo_oci_field_is_null) ZEND_DEP_FALIAS(ocicolumnisnull, oci_field_is_null, arginfo_ocicolumnisnull) - ZEND_FE(oci_internal_debug, arginfo_oci_internal_debug) - ZEND_DEP_FALIAS(ociinternaldebug, oci_internal_debug, arginfo_ociinternaldebug) ZEND_FE(oci_execute, arginfo_oci_execute) ZEND_DEP_FALIAS(ociexecute, oci_execute, arginfo_ociexecute) ZEND_FE(oci_cancel, arginfo_oci_cancel) ZEND_DEP_FALIAS(ocicancel, oci_cancel, arginfo_ocicancel) ZEND_FE(oci_fetch, arginfo_oci_fetch) ZEND_DEP_FALIAS(ocifetch, oci_fetch, arginfo_ocifetch) - ZEND_FE(ocifetchinto, arginfo_ocifetchinto) + ZEND_DEP_FE(ocifetchinto, arginfo_ocifetchinto) ZEND_FE(oci_fetch_all, arginfo_oci_fetch_all) ZEND_DEP_FALIAS(ocifetchstatement, oci_fetch_all, arginfo_ocifetchstatement) ZEND_FE(oci_fetch_object, arginfo_oci_fetch_object) diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 2dba527625b86..58e069eb5d443 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -1241,13 +1241,6 @@ PHP_FUNCTION(oci_field_is_null) } /* }}} */ -/* {{{ Toggle internal debugging output for the OCI extension */ -PHP_FUNCTION(oci_internal_debug) -{ - /* NOP in OCI8 2.0. Obsoleted by DTrace probes */ -} -/* }}} */ - /* {{{ Execute a parsed statement */ PHP_FUNCTION(oci_execute) { diff --git a/ext/oci8/tests/debug.phpt b/ext/oci8/tests/debug.phpt deleted file mode 100644 index f66eeb9698039..0000000000000 --- a/ext/oci8/tests/debug.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -oci_internal_debug() ---SKIPIF-- - ---FILE-- - -===DONE=== ---EXPECT-- -===DONE=== diff --git a/ext/oci8/tests/existence_aliases.phpt b/ext/oci8/tests/existence_aliases.phpt index e2c224e8a5fc0..153c1bcf16a7f 100644 --- a/ext/oci8/tests/existence_aliases.phpt +++ b/ext/oci8/tests/existence_aliases.phpt @@ -19,7 +19,6 @@ var_dump(function_exists('ocicancel')); var_dump(function_exists('ocifetch')); var_dump(function_exists('ocifetchstatement')); var_dump(function_exists('ocifreestatement')); -var_dump(function_exists('ociinternaldebug')); var_dump(function_exists('ocinumcols')); var_dump(function_exists('ociparse')); var_dump(function_exists('ocinewcursor')); @@ -97,4 +96,3 @@ bool(true) bool(true) bool(true) bool(true) -bool(true) diff --git a/ext/oci8/tests/field_funcs1.phpt b/ext/oci8/tests/field_funcs1.phpt index 6557dcd4b2f96..615cf03217ac1 100644 --- a/ext/oci8/tests/field_funcs1.phpt +++ b/ext/oci8/tests/field_funcs1.phpt @@ -50,15 +50,6 @@ var_dump(oci_field_scale($s, "none")); var_dump(oci_field_precision($s, "none")); var_dump(oci_field_size($s, "none")); -echo "Test 4\n"; -var_dump(oci_field_is_null($s, array())); -var_dump(oci_field_name($s, array())); -var_dump(oci_field_type($s, array())); -var_dump(oci_field_type_raw($s, array())); -var_dump(oci_field_scale($s, array())); -var_dump(oci_field_precision($s, array())); -var_dump(oci_field_size($s, array())); - // Cleanup $stmtarray = array( @@ -121,26 +112,4 @@ bool(false) Warning: oci_field_size(): Invalid column name "none" in %s on line %d bool(false) -Test 4 - -Warning: oci_field_is_null(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_name(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_type(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_type_raw(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_scale(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_precision(): Invalid column index "0" in %s on line %d -bool(false) - -Warning: oci_field_size(): Invalid column index "0" in %s on line %d -bool(false) Done diff --git a/ext/oci8/tests/reflection1.phpt b/ext/oci8/tests/reflection1.phpt deleted file mode 100644 index 3420387326e32..0000000000000 --- a/ext/oci8/tests/reflection1.phpt +++ /dev/null @@ -1,671 +0,0 @@ ---TEST-- -Test OCI8 Reflection ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Function [ function oci_define_by_name ] { - - - Parameters [4] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_name ] - Parameter #2 [ &$variable ] - Parameter #3 [ $type ] - } -} - -Function [ function oci_bind_by_name ] { - - - Parameters [5] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_name ] - Parameter #2 [ &$variable ] - Parameter #3 [ $maximum_length ] - Parameter #4 [ $type ] - } -} - -Function [ function oci_bind_array_by_name ] { - - - Parameters [6] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_name ] - Parameter #2 [ &$variable ] - Parameter #3 [ $maximum_array_length ] - Parameter #4 [ $maximum_item_length ] - Parameter #5 [ $type ] - } -} - -Function [ function oci_field_is_null ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_name ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_size ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_scale ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_precision ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_type ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_field_type_raw ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_execute ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $mode ] - } -} - -Function [ function oci_cancel ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_fetch ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_fetch_object ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_fetch_row ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_fetch_assoc ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_fetch_array ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $mode ] - } -} - -Function [ function oci_fetch_all ] { - - - Parameters [5] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ &$output ] - Parameter #2 [ $skip ] - Parameter #3 [ $maximum_rows ] - Parameter #4 [ $flags ] - } -} - -Function [ function oci_free_statement ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_internal_debug ] { - - - Parameters [1] { - Parameter #0 [ $mode ] - } -} - -Function [ function oci_num_fields ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_parse ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $sql_text ] - } -} - -Function [ function oci_new_cursor ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function oci_result ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $column_number_or_name ] - } -} - -Function [ function oci_server_version ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function oci_statement_type ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_num_rows ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_close ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function oci_connect ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function oci_new_connect ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function oci_pconnect ] { - - - Parameters [5] { - Parameter #0 [ $username ] - Parameter #1 [ $password ] - Parameter #2 [ $connection_string ] - Parameter #3 [ $character_set ] - Parameter #4 [ $session_mode ] - } -} - -Function [ function oci_error ] { - - - Parameters [1] { - Parameter #0 [ $connection_or_statement_resource ] - } -} - -Function [ function oci_free_descriptor ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_save ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $data ] - Parameter #2 [ $offset ] - } -} - -Function [ function oci_lob_import ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $filename ] - } -} - -Function [ function oci_lob_size ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_load ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_read ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $length ] - } -} - -Function [ function oci_lob_eof ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_tell ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_truncate ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $length ] - } -} - -Function [ function oci_lob_erase ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $offset ] - Parameter #2 [ $length ] - } -} - -Function [ function oci_lob_flush ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $flag ] - } -} - -Function [ function ocisetbufferinglob ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $mode ] - } -} - -Function [ function ocigetbufferinglob ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_is_equal ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_rewind ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor ] - } -} - -Function [ function oci_lob_write ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $string ] - Parameter #2 [ $length ] - } -} - -Function [ function oci_lob_append ] { - - - Parameters [2] { - Parameter #0 [ $lob_descriptor_to ] - Parameter #1 [ $lob_descriptor_from ] - } -} - -Function [ function oci_lob_copy ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor_to ] - Parameter #1 [ $lob_descriptor_from ] - Parameter #2 [ $length ] - } -} - -Function [ function oci_lob_export ] { - - - Parameters [4] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $filename ] - Parameter #2 [ $start ] - Parameter #3 [ $length ] - } -} - -Function [ function oci_lob_seek ] { - - - Parameters [3] { - Parameter #0 [ $lob_descriptor ] - Parameter #1 [ $offset ] - Parameter #2 [ $whence ] - } -} - -Function [ function oci_commit ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function oci_rollback ] { - - - Parameters [1] { - Parameter #0 [ $connection_resource ] - } -} - -Function [ function oci_new_descriptor ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $type ] - } -} - -Function [ function oci_set_prefetch ] { - - - Parameters [2] { - Parameter #0 [ $statement_resource ] - Parameter #1 [ $number_of_rows ] - } -} - -Function [ function oci_password_change ] { - - - Parameters [4] { - Parameter #0 [ $connection_resource_or_connection_string ] - Parameter #1 [ $username ] - Parameter #2 [ $old_password ] - Parameter #3 [ $new_password ] - } -} - -Function [ function oci_free_collection ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function oci_collection_append ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $value ] - } -} - -Function [ function oci_collection_element_get ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $index ] - } -} - -Function [ function oci_collection_element_assign ] { - - - Parameters [3] { - Parameter #0 [ $collection ] - Parameter #1 [ $index ] - Parameter #2 [ $value ] - } -} - -Function [ function oci_collection_assign ] { - - - Parameters [2] { - Parameter #0 [ $collection_to ] - Parameter #1 [ $collection_from ] - } -} - -Function [ function oci_collection_size ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function oci_collection_max ] { - - - Parameters [1] { - Parameter #0 [ $collection ] - } -} - -Function [ function oci_collection_trim ] { - - - Parameters [2] { - Parameter #0 [ $collection ] - Parameter #1 [ $number ] - } -} - -Function [ function oci_new_collection ] { - - - Parameters [3] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $type_name ] - Parameter #2 [ $schema_name ] - } -} - -Function [ function oci_free_cursor ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} - -Function [ function oci_set_edition ] { - - - Parameters [1] { - Parameter #0 [ $edition_name ] - } -} - -Function [ function oci_set_module_name ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $module_name ] - } -} - -Function [ function oci_set_action ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $action ] - } -} - -Function [ function oci_set_client_info ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $client_information ] - } -} - -Function [ function oci_set_client_identifier ] { - - - Parameters [2] { - Parameter #0 [ $connection_resource ] - Parameter #1 [ $client_identifier ] - } -} - -Function [ function oci_get_implicit_resultset ] { - - - Parameters [1] { - Parameter #0 [ $statement_resource ] - } -} \ No newline at end of file diff --git a/ext/oci8/tests/reflection2.phpt b/ext/oci8/tests/reflection2.phpt deleted file mode 100644 index 38ee637b2751c..0000000000000 --- a/ext/oci8/tests/reflection2.phpt +++ /dev/null @@ -1,255 +0,0 @@ ---TEST-- -Test OCI8 LOB & Collection Class Reflection ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Class [ class OCI-Lob ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [0] { - } - - - Methods [22] { - Method [ public method load ] { - - - Parameters [0] { - } - } - - Method [ public method tell ] { - - - Parameters [0] { - } - } - - Method [ public method truncate ] { - - - Parameters [1] { - Parameter #0 [ $length ] - } - } - - Method [ public method erase ] { - - - Parameters [2] { - Parameter #0 [ $offset ] - Parameter #1 [ $length ] - } - } - - Method [ public method flush ] { - - - Parameters [1] { - Parameter #0 [ $flag ] - } - } - - Method [ public method setbuffering ] { - - - Parameters [1] { - Parameter #0 [ $mode ] - } - } - - Method [ public method getbuffering ] { - - - Parameters [0] { - } - } - - Method [ public method rewind ] { - - - Parameters [0] { - } - } - - Method [ public method read ] { - - - Parameters [1] { - Parameter #0 [ $length ] - } - } - - Method [ public method eof ] { - - - Parameters [0] { - } - } - - Method [ public method seek ] { - - - Parameters [2] { - Parameter #0 [ $offset ] - Parameter #1 [ $whence ] - } - } - - Method [ public method write ] { - - - Parameters [2] { - Parameter #0 [ $string ] - Parameter #1 [ $length ] - } - } - - Method [ public method append ] { - - - Parameters [1] { - Parameter #0 [ $lob_descriptor_from ] - } - } - - Method [ public method size ] { - - - Parameters [0] { - } - } - - Method [ public method writetofile ] { - - - Parameters [3] { - Parameter #0 [ $filename ] - Parameter #1 [ $start ] - Parameter #2 [ $length ] - } - } - - Method [ public method export ] { - - - Parameters [3] { - Parameter #0 [ $filename ] - Parameter #1 [ $start ] - Parameter #2 [ $length ] - } - } - - Method [ public method import ] { - - - Parameters [1] { - Parameter #0 [ $filename ] - } - } - - Method [ public method writetemporary ] { - - - Parameters [2] { - Parameter #0 [ $data ] - Parameter #1 [ $type ] - } - } - - Method [ public method close ] { - - - Parameters [0] { - } - } - - Method [ public method save ] { - - - Parameters [2] { - Parameter #0 [ $data ] - Parameter #1 [ $offset ] - } - } - - Method [ public method savefile ] { - - - Parameters [1] { - Parameter #0 [ $filename ] - } - } - - Method [ public method free ] { - - - Parameters [0] { - } - } - } -} - -Class [ class OCI-Collection ] { - - - Constants [0] { - } - - - Static properties [0] { - } - - - Static methods [0] { - } - - - Properties [0] { - } - - - Methods [8] { - Method [ public method append ] { - - - Parameters [1] { - Parameter #0 [ $value ] - } - } - - Method [ public method getelem ] { - - - Parameters [1] { - Parameter #0 [ $index ] - } - } - - Method [ public method assignelem ] { - - - Parameters [2] { - Parameter #0 [ $index ] - Parameter #1 [ $value ] - } - } - - Method [ public method assign ] { - - - Parameters [1] { - Parameter #0 [ $collection_from ] - } - } - - Method [ public method size ] { - - - Parameters [0] { - } - } - - Method [ public method max ] { - - - Parameters [0] { - } - } - - Method [ public method trim ] { - - - Parameters [1] { - Parameter #0 [ $number ] - } - } - - Method [ public method free ] { - - - Parameters [0] { - } - } - } -} - diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c index 59429082f7cc3..aee3931f0520d 100644 --- a/ext/opcache/Optimizer/block_pass.c +++ b/ext/opcache/Optimizer/block_pass.c @@ -115,6 +115,10 @@ static int get_const_switch_target(zend_cfg *cfg, zend_op_array *op_array, zend_ /* fallback to next block */ return block->successors[block->successors_count - 1]; } + if (opline->opcode == ZEND_MATCH && Z_TYPE_P(val) != IS_LONG && Z_TYPE_P(val) != IS_STRING) { + /* always jump to the default arm */ + return block->successors[block->successors_count - 1]; + } if (Z_TYPE_P(val) == IS_LONG) { zv = zend_hash_index_find(jumptable, Z_LVAL_P(val)); } else { @@ -123,7 +127,7 @@ static int get_const_switch_target(zend_cfg *cfg, zend_op_array *op_array, zend_ } if (!zv) { /* default */ - return block->successors[block->successors_count - 2]; + return block->successors[block->successors_count - (opline->opcode == ZEND_MATCH ? 1 : 2)]; } return cfg->map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(zv))]; } @@ -369,6 +373,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) { /* SWITCH variable will be deleted later by FREE, so we can't optimize it */ Tsource[VAR_NUM(opline->op1.var)] = NULL; @@ -387,6 +392,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array break; case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_COPY_TMP: if (opline->op1_type & (IS_TMP_VAR|IS_VAR)) { /* Variable will be deleted later by FREE, so we can't optimize it */ @@ -1046,11 +1052,12 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL(ZEND_OP2_LITERAL(opline)); zval *zv; uint32_t s = 0; - ZEND_ASSERT(b->successors_count == 2 + zend_hash_num_elements(jumptable)); + ZEND_ASSERT(b->successors_count == (opline->opcode == ZEND_MATCH ? 1 : 2) + zend_hash_num_elements(jumptable)); ZEND_HASH_FOREACH_VAL(jumptable, zv) { Z_LVAL_P(zv) = ZEND_OPLINE_TO_OFFSET(opline, new_opcodes + blocks[b->successors[s++]].start); diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index 43f2ef71a242b..9f533ea167392 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -106,6 +106,7 @@ static inline zend_bool may_have_side_effects( case ZEND_IS_SMALLER: case ZEND_IS_SMALLER_OR_EQUAL: case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_CAST: case ZEND_ROPE_INIT: case ZEND_ROPE_ADD: @@ -146,6 +147,7 @@ static inline zend_bool may_have_side_effects( case ZEND_ECHO: case ZEND_INCLUDE_OR_EVAL: case ZEND_THROW: + case ZEND_MATCH_ERROR: case ZEND_EXT_STMT: case ZEND_EXT_FCALL_BEGIN: case ZEND_EXT_FCALL_END: @@ -391,7 +393,8 @@ static zend_bool dce_instr(context *ctx, zend_op *opline, zend_ssa_op *ssa_op) { if ((opline->op1_type & (IS_VAR|IS_TMP_VAR))&& !is_var_dead(ctx, ssa_op->op1_use)) { if (!try_remove_var_def(ctx, ssa_op->op1_use, ssa_op->op1_use_chain, opline)) { if (ssa->var_info[ssa_op->op1_use].type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_REF) - && opline->opcode != ZEND_CASE) { + && opline->opcode != ZEND_CASE + && opline->opcode != ZEND_CASE_STRICT) { free_var = ssa_op->op1_use; free_var_type = opline->op1_type; } diff --git a/ext/opcache/Optimizer/dfa_pass.c b/ext/opcache/Optimizer/dfa_pass.c index a8bff00557d17..0b69323980c7c 100644 --- a/ext/opcache/Optimizer/dfa_pass.c +++ b/ext/opcache/Optimizer/dfa_pass.c @@ -641,6 +641,7 @@ static void zend_ssa_replace_control_link(zend_op_array *op_array, zend_ssa *ssa break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL(ZEND_OP2_LITERAL(opline)); zval *zv; @@ -895,48 +896,29 @@ static int zend_dfa_optimize_jmps(zend_op_array *op_array, zend_ssa *ssa) break; } case ZEND_SWITCH_LONG: - if (opline->op1_type == IS_CONST) { - zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); - if (Z_TYPE_P(zv) != IS_LONG) { - removed_ops++; - MAKE_NOP(opline); - opline->extended_value = 0; - take_successor_ex(ssa, block_num, block, block->successors[0]); - goto optimize_nop; - } else { - HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); - zval *jmp_zv = zend_hash_index_find(jmptable, Z_LVAL_P(zv)); - uint32_t target; - - if (jmp_zv) { - target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(jmp_zv)); - } else { - target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value); - } - opline->opcode = ZEND_JMP; - opline->extended_value = 0; - SET_UNUSED(opline->op1); - ZEND_SET_OP_JMP_ADDR(opline, opline->op1, op_array->opcodes + target); - SET_UNUSED(opline->op2); - take_successor_ex(ssa, block_num, block, ssa->cfg.map[target]); - goto optimize_jmp; - } - } - break; case ZEND_SWITCH_STRING: + case ZEND_MATCH: if (opline->op1_type == IS_CONST) { zval *zv = CT_CONSTANT_EX(op_array, opline->op1.constant); - if (Z_TYPE_P(zv) != IS_STRING) { + zend_uchar type = Z_TYPE_P(zv); + zend_bool correct_type = + (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) + || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) + || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); + + if (!correct_type) { removed_ops++; MAKE_NOP(opline); opline->extended_value = 0; - take_successor_ex(ssa, block_num, block, block->successors[0]); + take_successor_ex(ssa, block_num, block, block->successors[block->successors_count - 1]); goto optimize_nop; } else { HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); - zval *jmp_zv = zend_hash_find(jmptable, Z_STR_P(zv)); - uint32_t target; + zval *jmp_zv = type == IS_LONG + ? zend_hash_index_find(jmptable, Z_LVAL_P(zv)) + : zend_hash_find(jmptable, Z_STR_P(zv)); + uint32_t target; if (jmp_zv) { target = ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(jmp_zv)); } else { diff --git a/ext/opcache/Optimizer/pass1.c b/ext/opcache/Optimizer/pass1.c index 3beb1788a3e76..fee0e1eac36f6 100644 --- a/ext/opcache/Optimizer/pass1.c +++ b/ext/opcache/Optimizer/pass1.c @@ -82,6 +82,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) case ZEND_BOOL_XOR: case ZEND_SPACESHIP: case ZEND_CASE: + case ZEND_CASE_STRICT: if (opline->op1_type == IS_CONST && opline->op2_type == IS_CONST) { /* binary operation with constant operands */ @@ -663,6 +664,7 @@ void zend_optimizer_pass1(zend_op_array *op_array, zend_optimizer_ctx *ctx) case ZEND_GENERATOR_RETURN: case ZEND_EXIT: case ZEND_THROW: + case ZEND_MATCH_ERROR: case ZEND_CATCH: case ZEND_FAST_CALL: case ZEND_FAST_RET: diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index c51b5c3ee23df..ee8ccc34a7783 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -300,10 +300,15 @@ static zend_bool try_replace_op1( switch (opline->opcode) { case ZEND_CASE: opline->opcode = ZEND_IS_EQUAL; - /* break missing intentionally */ + goto replace_op1_simple; + case ZEND_CASE_STRICT: + opline->opcode = ZEND_IS_IDENTICAL; + goto replace_op1_simple; case ZEND_FETCH_LIST_R: case ZEND_SWITCH_STRING: case ZEND_SWITCH_LONG: + case ZEND_MATCH: +replace_op1_simple: if (Z_TYPE(zv) == IS_STRING) { zend_string_hash_val(Z_STR(zv)); } @@ -1460,6 +1465,7 @@ static void sccp_visit_instr(scdf_ctx *scdf, zend_op *opline, zend_ssa_op *ssa_o case ZEND_BW_XOR: case ZEND_BOOL_XOR: case ZEND_CASE: + case ZEND_CASE_STRICT: SKIP_IF_TOP(op1); SKIP_IF_TOP(op2); @@ -1986,11 +1992,23 @@ static void sccp_mark_feasible_successors( s = zend_hash_num_elements(Z_ARR_P(op1)) != 0; break; case ZEND_SWITCH_LONG: - if (Z_TYPE_P(op1) == IS_LONG) { + case ZEND_SWITCH_STRING: + case ZEND_MATCH: + { + zend_bool strict_comparison = opline->opcode == ZEND_MATCH; + zend_uchar type = Z_TYPE_P(op1); + zend_bool correct_type = + (opline->opcode == ZEND_SWITCH_LONG && type == IS_LONG) + || (opline->opcode == ZEND_SWITCH_STRING && type == IS_STRING) + || (opline->opcode == ZEND_MATCH && (type == IS_LONG || type == IS_STRING)); + + if (correct_type) { zend_op_array *op_array = scdf->op_array; zend_ssa *ssa = scdf->ssa; HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); - zval *jmp_zv = zend_hash_index_find(jmptable, Z_LVAL_P(op1)); + zval *jmp_zv = type == IS_LONG + ? zend_hash_index_find(jmptable, Z_LVAL_P(op1)) + : zend_hash_find(jmptable, Z_STR_P(op1)); int target; if (jmp_zv) { @@ -2000,27 +2018,16 @@ static void sccp_mark_feasible_successors( } scdf_mark_edge_feasible(scdf, block_num, target); return; - } - s = 0; - break; - case ZEND_SWITCH_STRING: - if (Z_TYPE_P(op1) == IS_STRING) { + } else if (strict_comparison) { zend_op_array *op_array = scdf->op_array; zend_ssa *ssa = scdf->ssa; - HashTable *jmptable = Z_ARRVAL_P(CT_CONSTANT_EX(op_array, opline->op2.constant)); - zval *jmp_zv = zend_hash_find(jmptable, Z_STR_P(op1)); - int target; - - if (jmp_zv) { - target = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, Z_LVAL_P(jmp_zv))]; - } else { - target = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]; - } + int target = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]; scdf_mark_edge_feasible(scdf, block_num, target); return; } s = 0; break; + } default: for (s = 0; s < block->successors_count; s++) { scdf_mark_edge_feasible(scdf, block_num, block->successors[s]); diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index 6ac5781e09dca..d80edda3e1b0d 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -73,7 +73,11 @@ static void zend_mark_reachable(zend_op *opcodes, zend_cfg *cfg, zend_basic_bloc succ->flags |= ZEND_BB_FOLLOW; } } else { - ZEND_ASSERT(opcode == ZEND_SWITCH_LONG || opcode == ZEND_SWITCH_STRING); + ZEND_ASSERT( + opcode == ZEND_SWITCH_LONG + || opcode == ZEND_SWITCH_STRING + || opcode == ZEND_MATCH + ); if (i == b->successors_count - 1) { succ->flags |= ZEND_BB_FOLLOW | ZEND_BB_TARGET; } else { @@ -296,6 +300,7 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b case ZEND_RETURN_BY_REF: case ZEND_GENERATOR_RETURN: case ZEND_EXIT: + case ZEND_MATCH_ERROR: if (i + 1 < op_array->last) { BB_START(i + 1); } @@ -391,6 +396,7 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL_P(CRT_CONSTANT(opline->op2)); zval *zv; @@ -507,6 +513,7 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b case ZEND_GENERATOR_RETURN: case ZEND_EXIT: case ZEND_THROW: + case ZEND_MATCH_ERROR: break; case ZEND_JMP: block->successors_count = 1; @@ -557,12 +564,13 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL_P(CRT_CONSTANT(opline->op2)); zval *zv; uint32_t s = 0; - block->successors_count = 2 + zend_hash_num_elements(jumptable); + block->successors_count = (opline->opcode == ZEND_MATCH ? 1 : 2) + zend_hash_num_elements(jumptable); block->successors = zend_arena_calloc(arena, block->successors_count, sizeof(int)); ZEND_HASH_FOREACH_VAL(jumptable, zv) { @@ -570,7 +578,9 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b } ZEND_HASH_FOREACH_END(); block->successors[s++] = block_map[ZEND_OFFSET_TO_OPLINE_NUM(op_array, opline, opline->extended_value)]; - block->successors[s++] = j + 1; + if (opline->opcode != ZEND_MATCH) { + block->successors[s++] = j + 1; + } break; } default: diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c index dfd939f332c5a..ce23c4d473e67 100644 --- a/ext/opcache/Optimizer/zend_dump.c +++ b/ext/opcache/Optimizer/zend_dump.c @@ -615,7 +615,11 @@ void zend_dump_op(const zend_op_array *op_array, const zend_basic_block *b, cons if (opline->op2_type == IS_CONST) { zval *op = CRT_CONSTANT(opline->op2); - if (opline->opcode == ZEND_SWITCH_LONG || opline->opcode == ZEND_SWITCH_STRING) { + if ( + opline->opcode == ZEND_SWITCH_LONG + || opline->opcode == ZEND_SWITCH_STRING + || opline->opcode == ZEND_MATCH + ) { HashTable *jumptable = Z_ARRVAL_P(op); zend_string *key; zend_ulong num_key; diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index a087cae259a67..a6517527633cc 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -484,7 +484,7 @@ static const func_info_t func_infos[] = { F1("mysqli_fetch_fields", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_OBJECT), F1("mysqli_fetch_field_direct", MAY_BE_FALSE | MAY_BE_OBJECT), F1("mysqli_fetch_lengths", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_LONG), - F1("mysqli_fetch_row", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), + F1("mysqli_fetch_row", MAY_BE_NULL | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_ANY), F1("mysqli_get_client_info", MAY_BE_NULL | MAY_BE_STRING), F1("mysqli_get_host_info", MAY_BE_STRING), F1("mysqli_get_server_info", MAY_BE_STRING), diff --git a/ext/opcache/Optimizer/zend_inference.c b/ext/opcache/Optimizer/zend_inference.c index c4189975d5994..00708ca11bcb3 100644 --- a/ext/opcache/Optimizer/zend_inference.c +++ b/ext/opcache/Optimizer/zend_inference.c @@ -2413,6 +2413,7 @@ static zend_always_inline int _zend_update_type_info( case ZEND_JMPZ_EX: case ZEND_JMPNZ_EX: case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_BOOL: case ZEND_ISSET_ISEMPTY_CV: case ZEND_ISSET_ISEMPTY_VAR: @@ -4312,6 +4313,7 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze if (t1 & (MAY_BE_OBJECT|MAY_BE_RESOURCE|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_ARRAY)) { switch (opline->opcode) { case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_FE_FETCH_R: case ZEND_FE_FETCH_RW: case ZEND_FETCH_LIST_R: @@ -4380,12 +4382,14 @@ int zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op, const ze case ZEND_COALESCE: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: case ZEND_ISSET_ISEMPTY_VAR: case ZEND_ISSET_ISEMPTY_CV: case ZEND_FUNC_NUM_ARGS: case ZEND_FUNC_GET_ARGS: case ZEND_COPY_TMP: case ZEND_CHECK_FUNC_ARG: + case ZEND_CASE_STRICT: return 0; case ZEND_INIT_FCALL: /* can't throw, because call is resolved at compile time */ diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 8456c46078fd4..78b5893b2f406 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -293,6 +293,7 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array, * zend_optimizer_replace_by_const() supports this. */ return 0; case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_FETCH_LIST_R: case ZEND_COPY_TMP: case ZEND_FETCH_CLASS_NAME: @@ -558,7 +559,7 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array, break; /* In most cases IS_TMP_VAR operand may be used only once. * The operands are usually destroyed by the opcode handler. - * ZEND_CASE and ZEND_FETCH_LIST_R are exceptions, they keeps operand + * ZEND_CASE[_STRICT] and ZEND_FETCH_LIST_R are exceptions, they keeps operand * unchanged, and allows its reuse. these instructions * usually terminated by ZEND_FREE that finally kills the value. */ @@ -587,17 +588,25 @@ int zend_optimizer_replace_by_const(zend_op_array *op_array, } case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: - case ZEND_CASE: { + case ZEND_MATCH: + case ZEND_CASE: + case ZEND_CASE_STRICT: { zend_op *end = op_array->opcodes + op_array->last; while (opline < end) { if (opline->op1_type == type && opline->op1.var == var) { - if (opline->opcode == ZEND_CASE - || opline->opcode == ZEND_SWITCH_LONG - || opline->opcode == ZEND_SWITCH_STRING) { + if ( + opline->opcode == ZEND_CASE + || opline->opcode == ZEND_CASE_STRICT + || opline->opcode == ZEND_SWITCH_LONG + || opline->opcode == ZEND_SWITCH_STRING + || opline->opcode == ZEND_MATCH + ) { zval v; if (opline->opcode == ZEND_CASE) { opline->opcode = ZEND_IS_EQUAL; + } else if (opline->opcode == ZEND_CASE_STRICT) { + opline->opcode = ZEND_IS_IDENTICAL; } ZVAL_COPY(&v, val); if (Z_TYPE(v) == IS_STRING) { @@ -687,6 +696,7 @@ void zend_optimizer_migrate_jump(zend_op_array *op_array, zend_op *new_opline, z break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL(ZEND_OP2_LITERAL(opline)); zval *zv; @@ -731,6 +741,7 @@ void zend_optimizer_shift_jump(zend_op_array *op_array, zend_op *opline, uint32_ break; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: { HashTable *jumptable = Z_ARRVAL(ZEND_OP2_LITERAL(opline)); zval *zv; @@ -1105,6 +1116,7 @@ static void zend_redo_pass_two(zend_op_array *op_array) case ZEND_FE_FETCH_RW: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: /* relative extended_value don't have to be changed */ break; #endif @@ -1115,6 +1127,7 @@ static void zend_redo_pass_two(zend_op_array *op_array) case ZEND_IS_SMALLER: case ZEND_IS_SMALLER_OR_EQUAL: case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_ISSET_ISEMPTY_CV: case ZEND_ISSET_ISEMPTY_VAR: case ZEND_ISSET_ISEMPTY_DIM_OBJ: @@ -1225,6 +1238,7 @@ static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa) case ZEND_FE_FETCH_RW: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: /* relative extended_value don't have to be changed */ break; #endif @@ -1235,6 +1249,7 @@ static void zend_redo_pass_two_ex(zend_op_array *op_array, zend_ssa *ssa) case ZEND_IS_SMALLER: case ZEND_IS_SMALLER_OR_EQUAL: case ZEND_CASE: + case ZEND_CASE_STRICT: case ZEND_ISSET_ISEMPTY_CV: case ZEND_ISSET_ISEMPTY_VAR: case ZEND_ISSET_ISEMPTY_DIM_OBJ: diff --git a/ext/opcache/jit/dynasm/dasm_x86.h b/ext/opcache/jit/dynasm/dasm_x86.h index 77945ac655401..39449c15afdb3 100644 --- a/ext/opcache/jit/dynasm/dasm_x86.h +++ b/ext/opcache/jit/dynasm/dasm_x86.h @@ -17,11 +17,11 @@ /* Action definitions. DASM_STOP must be 255. */ enum { - DASM_DISP = 233, + DASM_DISP = 232, DASM_IMM_S, DASM_IMM_B, DASM_IMM_W, DASM_IMM_D, DASM_IMM_WB, DASM_IMM_DB, DASM_VREG, DASM_SPACE, DASM_SETLABEL, DASM_REL_A, DASM_REL_LG, DASM_REL_PC, - DASM_IMM_LG, DASM_IMM_PC, DASM_LABEL_LG, DASM_LABEL_PC, DASM_ALIGN, - DASM_EXTERN, DASM_ESC, DASM_MARK, DASM_SECTION, DASM_STOP + DASM_IMM_LG, DASM_IMM_PC, DASM_IMM_PC64, DASM_LABEL_LG, DASM_LABEL_PC, + DASM_ALIGN, DASM_EXTERN, DASM_ESC, DASM_MARK, DASM_SECTION, DASM_STOP }; /* Maximum number of section buffer positions for a single dasm_put() call. */ @@ -228,6 +228,7 @@ void dasm_put(Dst_DECL, int start, ...) pl -= 246; n = *pl; if (n < 0) n = 0; /* Start new chain for fwd rel if label exists. */ goto linkrel; + case DASM_IMM_PC64: ofs += 4; case DASM_REL_PC: case DASM_IMM_PC: pl = D->pclabels + va_arg(ap, int); CKPL(pc, PC); putrel: @@ -335,7 +336,8 @@ int dasm_link(Dst_DECL, size_t *szp) case DASM_SPACE: case DASM_IMM_LG: case DASM_VREG: p++; case DASM_DISP: case DASM_IMM_S: case DASM_IMM_B: case DASM_IMM_W: case DASM_IMM_D: case DASM_IMM_WB: case DASM_IMM_DB: - case DASM_SETLABEL: case DASM_REL_A: case DASM_IMM_PC: pos++; break; + case DASM_SETLABEL: case DASM_REL_A: case DASM_IMM_PC: case DASM_IMM_PC64: + pos++; break; case DASM_LABEL_LG: p++; case DASM_LABEL_PC: b[pos++] += ofs; break; /* Fix label offset. */ case DASM_ALIGN: ofs -= (b[pos++]+ofs)&*p++; break; /* Adjust ofs. */ @@ -359,10 +361,13 @@ int dasm_link(Dst_DECL, size_t *szp) #ifndef DASM_ALIGNED_WRITES typedef ZEND_SET_ALIGNED(1, unsigned short unaligned_short); typedef ZEND_SET_ALIGNED(1, unsigned int unaligned_int); +typedef ZEND_SET_ALIGNED(1, uint64_t unaligned_uint64_t); #define dasmw(x) \ do { *((unaligned_short *)cp) = (unsigned short)(x); cp+=2; } while (0) #define dasmd(x) \ do { *((unaligned_int *)cp) = (unsigned int)(x); cp+=4; } while (0) +#define dasmq(x) \ + do { *((unaligned_uint64_t *)cp) = (uint64_t)(x); cp+=8; } while (0) #else #define dasmw(x) do { dasmb(x); dasmb((x)>>8); } while (0) #define dasmd(x) do { dasmw(x); dasmw((x)>>16); } while (0) @@ -442,6 +447,11 @@ int dasm_encode(Dst_DECL, void *buffer) n = *pb < 0 ? pb[1] : (*pb + (int)(ptrdiff_t)base); goto wd; } + case DASM_IMM_PC64: { + int *pb = DASM_POS2PTR(D, n); + dasmq(*pb < 0 ? pb[1] : (*pb + (ptrdiff_t)base)); + break; + } case DASM_LABEL_LG: { int idx = *p++; if (idx >= 10) diff --git a/ext/opcache/jit/dynasm/dasm_x86.lua b/ext/opcache/jit/dynasm/dasm_x86.lua index a5efd98fb5f39..f7d81d838f962 100644 --- a/ext/opcache/jit/dynasm/dasm_x86.lua +++ b/ext/opcache/jit/dynasm/dasm_x86.lua @@ -47,7 +47,7 @@ local action_names = { -- action arg (1 byte) or int arg, 2 buffer pos (link, offset): "REL_LG", "REL_PC", -- action arg (1 byte) or int arg, 1 buffer pos (link): - "IMM_LG", "IMM_PC", + "IMM_LG", "IMM_PC", "IMM_PC64", -- action arg (1 byte) or int arg, 1 buffer pos (offset): "LABEL_LG", "LABEL_PC", -- action arg (1 byte), 1 buffer pos (offset): @@ -434,7 +434,11 @@ local function wputlabel(aprefix, imm, num) end wputxb(imm) else - waction(aprefix.."PC", imm, num) + if aprefix == "IMM_" and x64 then + waction("IMM_PC64", imm, num) + else + waction(aprefix.."PC", imm, num) + end end end diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 478244b6d7361..d0c1178d695f2 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -309,6 +309,9 @@ static void *dasm_link_and_encode(dasm_State **dasm_state, if (ret != DASM_S_OK) { // TODO: dasm_encode() failed ??? +#if ZEND_DEBUG + ZEND_UNREACHABLE(); +#endif return NULL; } @@ -681,15 +684,13 @@ static int zend_jit_op_array_analyze1(const zend_op_array *op_array, zend_script return SUCCESS; } -static int zend_jit_op_array_analyze2(const zend_op_array *op_array, zend_script *script, zend_ssa *ssa) +static int zend_jit_op_array_analyze2(const zend_op_array *op_array, zend_script *script, zend_ssa *ssa, uint32_t optimization_level) { if ((JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNC) && ssa->cfg.blocks && op_array->last_try_catch == 0 && !(op_array->fn_flags & ZEND_ACC_GENERATOR) && !(ssa->cfg.flags & ZEND_FUNC_INDIRECT_VAR_ACCESS)) { - - uint32_t optimization_level = ZCG(accel_directives).optimization_level; if (zend_ssa_inference(&CG(arena), op_array, script, ssa, optimization_level) != SUCCESS) { return FAILURE; } @@ -2119,7 +2120,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op && ssa->cfg.blocks[b].start != 0 && (op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_NOP || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_SWITCH_LONG - || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_SWITCH_STRING)) { + || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_SWITCH_STRING + || op_array->opcodes[ssa->cfg.blocks[b].start - 1].opcode == ZEND_MATCH)) { if (!zend_jit_reset_opline(&dasm_state, op_array->opcodes + ssa->cfg.blocks[b].start) || !zend_jit_set_valid_ip(&dasm_state, op_array->opcodes + ssa->cfg.blocks[b].start)) { goto jit_failure; @@ -2850,6 +2852,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op goto done; case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: if (!zend_jit_switch(&dasm_state, opline, op_array, ssa)) { goto jit_failure; } @@ -2897,6 +2900,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op case ZEND_OP_DATA: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: break; case ZEND_JMP: if (JIT_G(opt_level) < ZEND_JIT_LEVEL_INLINE) { @@ -2919,6 +2923,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op case ZEND_RETURN_BY_REF: case ZEND_RETURN: case ZEND_EXIT: + case ZEND_MATCH_ERROR: /* switch through trampoline */ case ZEND_YIELD: case ZEND_YIELD_FROM: @@ -3130,7 +3135,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons } } - if (zend_jit_op_array_analyze2(op_array, script, &ssa) != SUCCESS) { + if (zend_jit_op_array_analyze2(op_array, script, &ssa, ZCG(accel_directives).optimization_level) != SUCCESS) { goto jit_failure; } @@ -3455,7 +3460,7 @@ ZEND_EXT_API int zend_jit_script(zend_script *script) } info = ZEND_FUNC_INFO(call_graph.op_arrays[i]); if (info) { - if (zend_jit_op_array_analyze2(call_graph.op_arrays[i], script, &info->ssa) != SUCCESS) { + if (zend_jit_op_array_analyze2(call_graph.op_arrays[i], script, &info->ssa, ZCG(accel_directives).optimization_level) != SUCCESS) { goto jit_failure; } info->flags = info->ssa.cfg.flags; diff --git a/ext/opcache/jit/zend_jit.h b/ext/opcache/jit/zend_jit.h index 49150a62ae486..6320c408a1674 100644 --- a/ext/opcache/jit/zend_jit.h +++ b/ext/opcache/jit/zend_jit.h @@ -109,6 +109,8 @@ typedef struct _zend_jit_globals { zend_sym_node *symbols; /* symbols for disassembler */ + zend_bool tracing; + zend_jit_trace_rec *current_trace; zend_jit_trace_stack_frame *current_frame; diff --git a/ext/opcache/jit/zend_jit_helpers.c b/ext/opcache/jit/zend_jit_helpers.c index 90b78c9c242a6..ad26607fd68ad 100644 --- a/ext/opcache/jit/zend_jit_helpers.c +++ b/ext/opcache/jit/zend_jit_helpers.c @@ -362,13 +362,13 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim, if (UNEXPECTED(Z_TYPE_P(retval) == IS_INDIRECT)) { retval = Z_INDIRECT_P(retval); if (UNEXPECTED(Z_TYPE_P(retval) == IS_UNDEF)) { - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key)); ZVAL_NULL(result); return; } } } else { - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key)); ZVAL_NULL(result); return; } @@ -381,7 +381,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_r_helper(zend_array *ht, zval *dim, return; num_undef: - zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval); + zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval); ZVAL_NULL(result); } @@ -682,7 +682,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_str_r_helper(zval *container, zval if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) { break; } - zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim)); + zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim)); break; case IS_UNDEF: zend_jit_undefined_op_helper(EG(current_execute_data)->opline->op2.var); @@ -706,7 +706,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_str_r_helper(zval *container, zval } if (UNEXPECTED(Z_STRLEN_P(container) < ((offset < 0) ? -(size_t)offset : ((size_t)offset + 1)))) { - zend_error(E_WARNING, "Uninitialized string offset: " ZEND_LONG_FMT, offset); + zend_error(E_WARNING, "Uninitialized string offset " ZEND_LONG_FMT, offset); ZVAL_EMPTY_STRING(result); } else { zend_uchar c; @@ -812,7 +812,7 @@ static void ZEND_FASTCALL zend_jit_fetch_dim_obj_is_helper(zval *container, zval static zval* ZEND_FASTCALL zend_jit_fetch_dimension_rw_long_helper(HashTable *ht, zend_long hval) { - zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval); + zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval); return zend_hash_index_update(ht, hval, &EG(uninitialized_zval)); } @@ -828,7 +828,7 @@ static zend_never_inline zend_long zend_check_string_offset(zval *dim, int type) break; } if (type != BP_VAR_UNSET) { - zend_error(E_WARNING, "Illegal string offset '%s'", Z_STRVAL_P(dim)); + zend_error(E_WARNING, "Illegal string offset \"%s\"", Z_STRVAL_P(dim)); } break; case IS_UNDEF: @@ -964,7 +964,7 @@ static zend_never_inline void zend_assign_to_string_offset(zval *str, zval *dim, offset = zend_check_string_offset(dim, BP_VAR_W); if (offset < -(zend_long)Z_STRLEN_P(str)) { /* Error on negative offset */ - zend_error(E_WARNING, "Illegal string offset: " ZEND_LONG_FMT, offset); + zend_error(E_WARNING, "Illegal string offset " ZEND_LONG_FMT, offset); if (result) { ZVAL_NULL(result); } @@ -1787,13 +1787,13 @@ static void ZEND_FASTCALL zend_jit_invalid_array_access(zval *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_type_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", + "Attempt to modify property \"%s\" on %s", property_name, zend_zval_type_name(container)); } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 7a0e6fbcc2a80..278b3e61515fd 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -279,6 +279,7 @@ static int zend_jit_trace_may_exit(const zend_op_array *op_array, const zend_op case ZEND_FE_FETCH_RW: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: /* branch opcodes */ return 1; case ZEND_NEW: @@ -296,6 +297,7 @@ static int zend_jit_trace_may_exit(const zend_op_array *op_array, const zend_op case ZEND_YIELD: case ZEND_YIELD_FROM: case ZEND_INCLUDE_OR_EVAL: + case ZEND_MATCH_ERROR: /* unsupported */ return 1; case ZEND_DO_FCALL: @@ -492,7 +494,7 @@ static zend_ssa *zend_jit_trace_build_ssa(const zend_op_array *op_array, zend_sc } } - if (zend_jit_op_array_analyze2(op_array, script, ssa) != SUCCESS) { + if (zend_jit_op_array_analyze2(op_array, script, ssa, 0) != SUCCESS) { break; } @@ -919,7 +921,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin int i, v, idx, len, ssa_ops_count, vars_count, ssa_vars_count; zend_jit_trace_stack *stack; uint32_t build_flags = ZEND_SSA_RC_INFERENCE | ZEND_SSA_USE_CV_RESULTS; - uint32_t optimization_level = ZCG(accel_directives).optimization_level; + uint32_t optimization_level = 0; int call_level, level, num_op_arrays; size_t frame_size, stack_top, stack_size, stack_bottom; zend_jit_op_array_trace_extension *jit_extension; @@ -1261,7 +1263,8 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } else { ssa_var_info[i].type = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; } - } else if (op_array->function_name) { + } else if (op_array->function_name + && !zend_jit_var_may_be_modified_indirectly(op_array, ssa, i)) { ssa_vars[i].no_val = ssa->vars ? ssa->vars[i].no_val : 0; ssa_var_info[i].type = MAY_BE_UNDEF; } else { @@ -1722,7 +1725,8 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } else { ssa_var_info[v].type = MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; } - } else if (op_array->function_name) { + } else if (op_array->function_name + && !zend_jit_var_may_be_modified_indirectly(op_array, ssa, i)) { ssa_vars[v].no_val = ssa->vars ? ssa->vars[i].no_val : 0; ssa_var_info[v].type = MAY_BE_UNDEF; } else { @@ -2120,9 +2124,12 @@ static zend_lifetime_interval** zend_jit_trace_allocate_registers(zend_jit_trace || opline->opcode == ZEND_ADD || opline->opcode == ZEND_SUB || opline->opcode == ZEND_MUL) { - start[ssa_op->result_def] = idx; - vars_op_array[ssa_op->result_def] = op_array; - count++; + if (!(ssa->var_info[ssa_op->result_def].type & MAY_BE_DOUBLE) + || (opline->opcode != ZEND_PRE_INC && opline->opcode != ZEND_PRE_DEC)) { + start[ssa_op->result_def] = idx; + vars_op_array[ssa_op->result_def] = op_array; + count++; + } } } if (ssa_op->op1_def >= 0 @@ -3938,6 +3945,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par #if 0 case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: if (!zend_jit_switch(&dasm_state, opline, op_array, op_array_ssa)) { goto jit_failure; } @@ -5036,6 +5044,11 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const return 0; } + if (JIT_G(tracing)) { + ++(*ZEND_OP_TRACE_INFO(opline, offset)->counter); + return 0; + } + if (JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_START) { fprintf(stderr, "---- TRACE %d start (%s) %s() %s:%d\n", trace_num, @@ -5051,8 +5064,10 @@ int ZEND_FASTCALL zend_jit_trace_hot_root(zend_execute_data *execute_data, const goto abort; } + JIT_G(tracing) = 1; stop = zend_jit_trace_execute(execute_data, opline, trace_buffer, ZEND_OP_TRACE_INFO(opline, offset)->trace_flags & ZEND_JIT_TRACE_START_MASK, 0); + JIT_G(tracing) = 0; if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); @@ -5333,7 +5348,9 @@ int ZEND_FASTCALL zend_jit_trace_hot_side(zend_execute_data *execute_data, uint3 } } + JIT_G(tracing) = 1; stop = zend_jit_trace_execute(execute_data, EX(opline), trace_buffer, ZEND_JIT_TRACE_START_SIDE, is_megamorphic); + JIT_G(tracing) = 0; if (UNEXPECTED(JIT_G(debug) & ZEND_JIT_DEBUG_TRACE_BYTECODE)) { zend_jit_dump_trace(trace_buffer, NULL); @@ -5466,7 +5483,7 @@ int ZEND_FASTCALL zend_jit_trace_exit(uint32_t exit_num, zend_jit_registers_buf EX(opline) = opline; } - if (EG(vm_interrupt)) { + if (EG(vm_interrupt) || JIT_G(tracing)) { return 1; /* Lock-free check if the side trace was already JIT-ed or blacklist-ed in another process */ } else if (t->exit_info[exit_num].flags & (ZEND_JIT_EXIT_JITED|ZEND_JIT_EXIT_BLACKLISTED)) { @@ -5605,6 +5622,7 @@ static void zend_jit_trace_init_caches(void) static void zend_jit_trace_reset_caches(void) { + JIT_G(tracing) = 0; } static void zend_jit_trace_restart(void) diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c index c7c7afba9d014..755af16edefc4 100644 --- a/ext/opcache/jit/zend_jit_vm_helpers.c +++ b/ext/opcache/jit/zend_jit_vm_helpers.c @@ -255,7 +255,7 @@ static zend_always_inline int _zend_quick_get_constant( if (!c) { if (!check_defined_only) { - zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); + zend_throw_error(NULL, "Undefined constant \"%s\"", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))); ZVAL_UNDEF(EX_VAR(opline->result.var)); } CACHE_PTR(opline->extended_value, ENCODE_SPECIAL_CACHE_NUM(zend_hash_num_elements(EG(zend_constants)))); @@ -475,7 +475,7 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend } func = call->func; - if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { + if (func->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)) { /* TODO: Can we continue recording ??? */ return -1; } @@ -590,6 +590,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, if (UNEXPECTED(opline->opcode == ZEND_HANDLE_EXCEPTION)) { /* Abort trace because of exception */ +#ifdef HAVE_GCC_GLOBAL_REGS + execute_data = save_execute_data; + opline = save_opline; +#endif return ZEND_JIT_TRACE_STOP_EXCEPTION; } @@ -609,6 +613,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, if (prev_call) { int ret = zend_jit_trace_record_fake_init_call(prev_call, trace_buffer, idx, is_megamorphic, &megamorphic, ret_level + level); if (ret < 0) { +#ifdef HAVE_GCC_GLOBAL_REGS + execute_data = save_execute_data; + opline = save_opline; +#endif return ZEND_JIT_TRACE_STOP_BAD_FUNC; } idx = ret; @@ -855,6 +863,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex, /* TODO: Can we continue recording ??? */ stop = ZEND_JIT_TRACE_STOP_TRAMPOLINE; break; + } else if (EX(call)->func->common.fn_flags & ZEND_ACC_NEVER_CACHE) { + /* TODO: Can we continue recording ??? */ + stop = ZEND_JIT_TRACE_STOP_BAD_FUNC; + break; } func = EX(call)->func; if (func->type == ZEND_USER_FUNCTION diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 12dccc00ff693..c6f4a54492f76 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -1895,20 +1895,20 @@ static int zend_jit_undefined_offset_stub(dasm_State **Dst) |3: |.if X64WIN | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Undefined offset: " ZEND_LONG_FMT + | LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT | mov CARG3, aword [r0] | EXT_CALL zend_error, r0 | add r4, 0x28 // stack alignment |.elif X64 | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Undefined offset: " ZEND_LONG_FMT + | LOAD_ADDR CARG2, "Undefined array key " ZEND_LONG_FMT | mov CARG3, aword [r0] | EXT_CALL zend_error, r0 | add r4, 8 // stack alignment |.else | sub r4, 4 | push aword [r0] - | push "Undefined offset: " ZEND_LONG_FMT + | push "Undefined array key " ZEND_LONG_FMT | push E_NOTICE | EXT_CALL zend_error, r0 | add r4, 28 @@ -1963,14 +1963,14 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst) |3: |.if X64WIN | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Undefined index: %s" + | LOAD_ADDR CARG2, "Undefined array key \"%s\"" | mov CARG3, aword [r0] | add CARG3, offsetof(zend_string, val) | EXT_CALL zend_error, r0 | add r4, 0x28 |.elif X64 | mov CARG1, E_NOTICE - | LOAD_ADDR CARG2, "Undefined index: %s" + | LOAD_ADDR CARG2, "Undefined array key \"%s\"" | mov CARG3, aword [r0] | add CARG3, offsetof(zend_string, val) | EXT_CALL zend_error, r0 @@ -1980,7 +1980,7 @@ static int zend_jit_undefined_index_stub(dasm_State **Dst) | mov r0, aword [r0] | add r0, offsetof(zend_string, val) | push r0 - | push "Undefined index: %s" + | push "Undefined array key \"%s\"" | push E_NOTICE | EXT_CALL zend_error, r0 | add r4, 28 @@ -4944,7 +4944,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o switch (type) { case BP_VAR_R: if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) { - | // zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval); + | // zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, hval); | // retval = &EG(uninitialized_zval); | UNDEFINED_OFFSET opline | jmp >9 @@ -4965,7 +4965,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o |2: if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) { | SAVE_VALID_OPLINE opline, r0 - | // zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, hval); + | // zend_error(E_NOTICE,"Undefined arary offset " ZEND_LONG_FMT, hval); | //retval = zend_hash_index_update(ht, hval, &EG(uninitialized_zval)); | EXT_CALL zend_jit_fetch_dimension_rw_long_helper, r0 } @@ -5076,7 +5076,7 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o switch (type) { case BP_VAR_R: if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE) { - // zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + // zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key)); | UNDEFINED_INDEX opline | jmp >9 } else { @@ -5155,8 +5155,20 @@ static int zend_jit_fetch_dimension_address_inner(dasm_State **Dst, const zend_o case BP_JIT_IS: | EXT_CALL zend_jit_fetch_dim_isset_helper, r0 | test r0, r0 - | jne >8 - | jmp >9 + if (not_found_exit_addr) { + | je ¬_found_exit_addr + if (op2_info & (MAY_BE_LONG|MAY_BE_STRING)) { + | jmp >8 + } + } else if (found_exit_addr) { + | jne &found_exit_addr + if (op2_info & (MAY_BE_LONG|MAY_BE_STRING)) { + | jmp >9 + } + } else { + | jne >8 + | jmp >9 + } break; case BP_VAR_IS: case BP_VAR_UNSET: @@ -7666,7 +7678,6 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, const z | SET_ZVAL_TYPE_INFO res_addr, eax } } else { - ZEND_ASSERT(true_label != (uint32_t)-1 || false_label != (uint32_t)-1); if (exit_addr) { if (branch_opcode == ZEND_JMPNZ || branch_opcode == ZEND_JMPNZ_EX) { | jp >1 @@ -7677,6 +7688,7 @@ static int zend_jit_bool_jmpznz(dasm_State **Dst, const zend_op *opline, const z | je &exit_addr } } else { + ZEND_ASSERT(true_label != (uint32_t)-1 || false_label != (uint32_t)-1); if (false_label != (uint32_t)-1) { | jp =>false_label } else { @@ -10398,7 +10410,7 @@ static int zend_jit_isset_isempty_dim(dasm_State **Dst, const zend_op *opline, c && !(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_ARRAY)) && !may_throw && !(opline->op1_type & (IS_TMP_VAR|IS_VAR)) - && (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & MAY_BE_LONG))) { + && (!(opline->op2_type & (IS_TMP_VAR|IS_VAR)) || !(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-MAY_BE_LONG)))) { if (smart_branch_opcode == ZEND_JMPNZ) { found_exit_addr = exit_addr; } else { @@ -11377,10 +11389,13 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o { HashTable *jumptable = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); - if (sizeof(void*) == 8 && !IS_32BIT(dasm_end)) { - // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - return 1; + // TODO: Implement for match instructions + if (opline->opcode == ZEND_MATCH) { + // Since the match expression doesn't have a IS_IDENTICAL/JMPNZ chain + // we can't skip the jumptable and thus can't JIT the function + return 0; } + if (opline->op1_type == IS_CONST) { zval *zv = RT_CONSTANT(opline, opline->op1); zval *jump_zv; @@ -11444,23 +11459,25 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o | cmp FCARG2a, jumptable->nNumUsed | jae >3 |.if X64 - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - | movsxd r0, dword [FCARG2a * 4 + >4] - | jmp r0 + if (!IS_32BIT(dasm_end)) { + | lea r0, aword [>4] + | jmp aword [r0 + FCARG2a * 8] + } else { + | jmp aword [FCARG2a * 8 + >4] + } |.else | jmp aword [FCARG2a * 4 + >4] |.endif |3: |.cold_code + |.align aword |4: p = jumptable->arData; do { if (Z_TYPE(p->val) == IS_UNDEF) { - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? | .aword =>b } else { int b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL(p->val)) - op_array->opcodes]; - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? | .aword =>b } p++; @@ -11474,8 +11491,7 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o | jz =>b | LOAD_ADDR FCARG1a, jumptable | sub r0, aword [FCARG1a + offsetof(HashTable, arData)] - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - | mov FCARG1a, (sizeof(Bucket) / sizeof(uint32_t)) + | mov FCARG1a, (sizeof(Bucket) / sizeof(void*)) |.if X64 | cqo |.else @@ -11483,18 +11499,21 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o |.endif | idiv FCARG1a |.if X64 - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - | movsxd r0, dword [r0 + >4] - | jmp r0 + if (!IS_32BIT(dasm_end)) { + | lea FCARG1a, aword [>4] + | jmp aword [FCARG1a + r0] + } else { + | jmp aword [r0 + >4] + } |.else - | jmp dword [r0 + >4] + | jmp aword [r0 + >4] |.endif |3: |.cold_code + |.align aword |4: ZEND_HASH_FOREACH_VAL(jumptable, val) { b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(val)) - op_array->opcodes]; - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? | .aword =>b } ZEND_HASH_FOREACH_END(); |.code @@ -11527,8 +11546,7 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o | jz =>b | LOAD_ADDR FCARG1a, jumptable | sub r0, aword [FCARG1a + offsetof(HashTable, arData)] - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - | mov FCARG1a, (sizeof(Bucket) / sizeof(uint32_t)) + | mov FCARG1a, (sizeof(Bucket) / sizeof(void*)) |.if X64 | cqo |.else @@ -11536,23 +11554,22 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o |.endif | idiv FCARG1a |.if X64 - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - | movsxd r0, dword [r0 + >4] - | jmp r0 + if (!IS_32BIT(dasm_end)) { + | lea FCARG1a, aword [>4] + | jmp aword [FCARG1a + r0] + } else { + | jmp aword [r0 + >4] + } |.else - | jmp dword [r0 + >4] + | jmp aword [r0 + >4] |.endif |3: |.cold_code + |.align aword |4: ZEND_HASH_FOREACH_VAL(jumptable, val) { b = ssa->cfg.map[ZEND_OFFSET_TO_OPLINE(opline, Z_LVAL_P(val)) - op_array->opcodes]; - | // TODO: DynASM stores .aword as 4-bytes even in 64-bit mode ??? - |.if X64 | .aword =>b - |.else - | .aword =>b - |.endif } ZEND_HASH_FOREACH_END(); |.code } diff --git a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt index 4b570baaaf800..1cc55b40010e1 100644 --- a/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt +++ b/ext/opcache/tests/assign_obj_op_of_fetch_dim.phpt @@ -16,5 +16,5 @@ try { ?> --EXPECTF-- -Notice: Undefined offset: 0 in %s on line %d -Attempt to assign property 'y' on null +Notice: Undefined array key 0 in %s on line %d +Attempt to assign property "y" on null diff --git a/ext/opcache/tests/bug66251.phpt b/ext/opcache/tests/bug66251.phpt index 42c6e2f606921..20b2a166d7bca 100644 --- a/ext/opcache/tests/bug66251.phpt +++ b/ext/opcache/tests/bug66251.phpt @@ -13,7 +13,7 @@ const A="hello"; function getA() {return A;} ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'A' in %s:%d +Fatal error: Uncaught Error: Undefined constant "A" in %s:%d Stack trace: #0 %s(%d): getA() #1 {main} diff --git a/ext/opcache/tests/bug78014.phpt b/ext/opcache/tests/bug78014.phpt index 47ec05977c9ce..3b4d332828ae9 100644 --- a/ext/opcache/tests/bug78014.phpt +++ b/ext/opcache/tests/bug78014.phpt @@ -23,7 +23,7 @@ Warning: Can't preload unlinked class C: Parent with unresolved initializers B i Warning: Can't preload class B with unresolved initializer for constant X in %s on line %d -Fatal error: Uncaught Error: Class 'C' not found in %sbug78014.php:5 +Fatal error: Uncaught Error: Class "C" not found in %sbug78014.php:5 Stack trace: #0 {main} thrown in %sbug78014.php on line 5 diff --git a/ext/opcache/tests/bug78937_3.phpt b/ext/opcache/tests/bug78937_3.phpt index 81821e3109a75..fe9696816cc91 100644 --- a/ext/opcache/tests/bug78937_3.phpt +++ b/ext/opcache/tests/bug78937_3.phpt @@ -20,7 +20,7 @@ Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78 Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 -Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:3 +Fatal error: Uncaught Error: Class "Bar" not found in %spreload_bug78937.inc:3 Stack trace: #0 %sbug78937_3.php(3): foo() #1 {main} diff --git a/ext/opcache/tests/bug78937_6.phpt b/ext/opcache/tests/bug78937_6.phpt index 6e4d7060b3c76..019ddd7ae3e1b 100644 --- a/ext/opcache/tests/bug78937_6.phpt +++ b/ext/opcache/tests/bug78937_6.phpt @@ -21,7 +21,7 @@ Warning: Can't preload unlinked class Foo: Unknown parent Bar in %spreload_bug78 Warning: Can't preload unlinked class Bar@anonymous: Unknown parent Bar in %spreload_bug78937.inc on line 3 -Fatal error: Uncaught Error: Class 'Bar' not found in %spreload_bug78937.inc:6 +Fatal error: Uncaught Error: Class "Bar" not found in %spreload_bug78937.inc:6 Stack trace: #0 %sbug78937_6.php(3): bar() #1 {main} diff --git a/ext/opcache/tests/invalid_new_dce.phpt b/ext/opcache/tests/invalid_new_dce.phpt index c029a49bdc8b9..79dcf6b8128d6 100644 --- a/ext/opcache/tests/invalid_new_dce.phpt +++ b/ext/opcache/tests/invalid_new_dce.phpt @@ -39,4 +39,4 @@ try { test4(); } catch (Error $e) { echo $e->getMessage(), "\n"; } Cannot instantiate abstract class Foo Cannot instantiate interface Bar Cannot instantiate trait Baz -Cannot declare self-referencing constant 'Abc::BAR' +Cannot declare self-referencing constant Abc::BAR diff --git a/ext/opcache/tests/jit/fetch_dim_r_003.phpt b/ext/opcache/tests/jit/fetch_dim_r_003.phpt index 2638715236265..c71b13ec12da3 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_003.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_003.phpt @@ -48,10 +48,10 @@ string(1) "B" Warning: String offset cast occurred in %s on line %d string(1) "A" -Warning: Illegal string offset 'ab' in %sfetch_dim_r_003.php on line 12 +Warning: Illegal string offset "ab" in %sfetch_dim_r_003.php on line 12 string(1) "A" -Warning: Illegal string offset 'ab' in %sfetch_dim_r_003.php on line 15 +Warning: Illegal string offset "ab" in %sfetch_dim_r_003.php on line 15 string(1) "A" Notice: A non well formed numeric value encountered in %sfetch_dim_r_003.php on line 16 diff --git a/ext/opcache/tests/jit/fetch_dim_r_004.phpt b/ext/opcache/tests/jit/fetch_dim_r_004.phpt index 0fd705942e5c5..b781dc2cc4b42 100644 --- a/ext/opcache/tests/jit/fetch_dim_r_004.phpt +++ b/ext/opcache/tests/jit/fetch_dim_r_004.phpt @@ -48,10 +48,10 @@ string(1) "B" Warning: String offset cast occurred in %s on line %d string(1) "A" -Warning: Illegal string offset 'ab' in %sfetch_dim_r_004.php on line 4 +Warning: Illegal string offset "ab" in %sfetch_dim_r_004.php on line 4 string(1) "A" -Warning: Illegal string offset 'ab' in %sfetch_dim_r_004.php on line 4 +Warning: Illegal string offset "ab" in %sfetch_dim_r_004.php on line 4 string(1) "A" Notice: A non well formed numeric value encountered in %sfetch_dim_r_004.php on line 4 diff --git a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt index c5772220cbd9f..9967896d1fb9b 100644 --- a/ext/opcache/tests/jit/fetch_dim_rw_001.phpt +++ b/ext/opcache/tests/jit/fetch_dim_rw_001.phpt @@ -18,9 +18,9 @@ var_dump(foo()); --EXPECTF-- Warning: Undefined variable $a in %s on line %d -Notice: Undefined offset: 0 in %sfetch_dim_rw_001.php on line 3 +Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3 -Notice: Undefined offset: 0 in %sfetch_dim_rw_001.php on line 3 +Notice: Undefined array key 0 in %sfetch_dim_rw_001.php on line 3 array(1) { [0]=> int(2) diff --git a/ext/opcache/tests/jit/fetch_obj_001.phpt b/ext/opcache/tests/jit/fetch_obj_001.phpt index 49de772b66c9f..62631fa8932a8 100644 --- a/ext/opcache/tests/jit/fetch_obj_001.phpt +++ b/ext/opcache/tests/jit/fetch_obj_001.phpt @@ -128,10 +128,10 @@ object(stdClass)#%d (2) { array(0) { } } -Attempt to modify property 'abc' on array +Attempt to modify property "abc" on array array(0) { } -Attempt to modify property 'abc' on null +Attempt to modify property "abc" on null NULL -Attempt to modify property 'abc' on string +Attempt to modify property "abc" on string string(0) "" diff --git a/ext/opcache/tests/match/001.phpt b/ext/opcache/tests/match/001.phpt new file mode 100644 index 0000000000000..0f6c4f07075c8 --- /dev/null +++ b/ext/opcache/tests/match/001.phpt @@ -0,0 +1,71 @@ +--TEST-- +Match expression string jump table +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- + +--FILE-- + 'a', + 'b', 'c' => 'b, c', + 'd' => 'd', + 'e', 'f' => 'e, f', + 'g' => 'g', + 'h', 'i' => 'h, i', + }; +} + +foreach (range('a', 'i') as $char) { + var_dump(test($char)); +} + +--EXPECTF-- +$_main: + ; (lines=15, args=0, vars=1, tmps=2) + ; (after optimizer) + ; %s +0000 INIT_FCALL 2 %d string("range") +0001 SEND_VAL string("a") 1 +0002 SEND_VAL string("i") 2 +0003 V2 = DO_ICALL +0004 V1 = FE_RESET_R V2 0013 +0005 FE_FETCH_R V1 CV0($char) 0013 +0006 INIT_FCALL 1 %d string("var_dump") +0007 INIT_FCALL 1 %d string("test") +0008 SEND_VAR CV0($char) 1 +0009 V2 = DO_UCALL +0010 SEND_VAR V2 1 +0011 DO_ICALL +0012 JMP 0005 +0013 FE_FREE V1 +0014 RETURN int(1) +LIVE RANGES: + 1: 0005 - 0013 (loop) + +test: + ; (lines=9, args=1, vars=1, tmps=0) + ; (after optimizer) + ; %s +0000 CV0($char) = RECV 1 +0001 MATCH CV0($char) "a": 0002, "b": 0003, "c": 0003, "d": 0004, "e": 0005, "f": 0005, "g": 0006, "h": 0007, "i": 0007, default: 0008 +0002 RETURN string("a") +0003 RETURN string("b, c") +0004 RETURN string("d") +0005 RETURN string("e, f") +0006 RETURN string("g") +0007 RETURN string("h, i") +0008 MATCH_ERROR CV0($char) +string(1) "a" +string(4) "b, c" +string(4) "b, c" +string(1) "d" +string(4) "e, f" +string(4) "e, f" +string(1) "g" +string(4) "h, i" +string(4) "h, i" diff --git a/ext/opcache/tests/match/002.phpt b/ext/opcache/tests/match/002.phpt new file mode 100644 index 0000000000000..22f29eeb8b2d0 --- /dev/null +++ b/ext/opcache/tests/match/002.phpt @@ -0,0 +1,57 @@ +--TEST-- +Test match jump table optimizer +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- + +--FILE-- + throw new RuntimeException(), + default => "No match\n", + }; +} +test(); + +function test2() { + $x = 2; + echo match($x) { + '1', '2', '3', '4', '5' => throw new RuntimeException(), + default => "No match\n", + }; +} +test2(); + +--EXPECTF-- +$_main: + ; (lines=5, args=0, vars=0, tmps=0) + ; (after optimizer) + ; %s +0000 INIT_FCALL 0 %d string("test") +0001 DO_UCALL +0002 INIT_FCALL 0 %d string("test2") +0003 DO_UCALL +0004 RETURN int(1) + +test: + ; (lines=2, args=0, vars=0, tmps=0) + ; (after optimizer) + ; %s +0000 ECHO string("No match +") +0001 RETURN null + +test2: + ; (lines=2, args=0, vars=0, tmps=0) + ; (after optimizer) + ; %s +0000 ECHO string("No match +") +0001 RETURN null +No match +No match diff --git a/ext/opcache/tests/match/003.phpt b/ext/opcache/tests/match/003.phpt new file mode 100644 index 0000000000000..f7f8896073286 --- /dev/null +++ b/ext/opcache/tests/match/003.phpt @@ -0,0 +1,74 @@ +--TEST-- +Match expression long jump table +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- + +--FILE-- + '1', + 2, 3 => '2, 3', + 4 => '4', + 5, 6 => '5, 6', + 7 => '7', + 8, 9 => '8, 9', + default => 'default' + }; +} + +foreach (range(0, 10) as $char) { + var_dump(test($char)); +} + +--EXPECTF-- +$_main: + ; (lines=15, args=0, vars=1, tmps=2) + ; (after optimizer) + ; %s +0000 INIT_FCALL 2 %d string("range") +0001 SEND_VAL int(0) 1 +0002 SEND_VAL int(10) 2 +0003 V2 = DO_ICALL +0004 V1 = FE_RESET_R V2 0013 +0005 FE_FETCH_R V1 CV0($char) 0013 +0006 INIT_FCALL 1 %d string("var_dump") +0007 INIT_FCALL 1 %d string("test") +0008 SEND_VAR CV0($char) 1 +0009 V2 = DO_UCALL +0010 SEND_VAR V2 1 +0011 DO_ICALL +0012 JMP 0005 +0013 FE_FREE V1 +0014 RETURN int(1) +LIVE RANGES: + 1: 0005 - 0013 (loop) + +test: + ; (lines=9, args=1, vars=1, tmps=0) + ; (after optimizer) + ; %s +0000 CV0($char) = RECV 1 +0001 MATCH CV0($char) 1: 0002, 2: 0003, 3: 0003, 4: 0004, 5: 0005, 6: 0005, 7: 0006, 8: 0007, 9: 0007, default: 0008 +0002 RETURN string("1") +0003 RETURN string("2, 3") +0004 RETURN string("4") +0005 RETURN string("5, 6") +0006 RETURN string("7") +0007 RETURN string("8, 9") +0008 RETURN string("default") +string(7) "default" +string(1) "1" +string(4) "2, 3" +string(4) "2, 3" +string(1) "4" +string(4) "5, 6" +string(4) "5, 6" +string(1) "7" +string(4) "8, 9" +string(4) "8, 9" +string(7) "default" diff --git a/ext/opcache/tests/match/004.phpt b/ext/opcache/tests/match/004.phpt new file mode 100644 index 0000000000000..f84a0b832d948 --- /dev/null +++ b/ext/opcache/tests/match/004.phpt @@ -0,0 +1,93 @@ +--TEST-- +Match expression mixed jump table +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.opt_debug_level=0x20000 +--SKIPIF-- + +--FILE-- + '1 int', + '1' => '1 string', + 2 => '2 int', + '2' => '2 string', + 3 => '3 int', + '3' => '3 string', + 4 => '4 int', + '4' => '4 string', + 5 => '5 int', + '5' => '5 string', + default => 'default', + }; +} + +foreach (range(0, 6) as $number) { + var_dump(test($number)); + var_dump(test((string) $number)); +} + +--EXPECTF-- +$_main: + ; (lines=22, args=0, vars=1, tmps=2) + ; (after optimizer) + ; %s.php:1-24 +0000 INIT_FCALL 2 %d string("range") +0001 SEND_VAL int(0) 1 +0002 SEND_VAL int(6) 2 +0003 V2 = DO_ICALL +0004 V1 = FE_RESET_R V2 0020 +0005 FE_FETCH_R V1 CV0($number) 0020 +0006 INIT_FCALL 1 %d string("var_dump") +0007 INIT_FCALL 1 %d string("test") +0008 SEND_VAR CV0($number) 1 +0009 V2 = DO_UCALL +0010 SEND_VAR V2 1 +0011 DO_ICALL +0012 INIT_FCALL 1 %d string("var_dump") +0013 INIT_FCALL 1 %d string("test") +0014 T2 = CAST (string) CV0($number) +0015 SEND_VAL T2 1 +0016 V2 = DO_UCALL +0017 SEND_VAR V2 1 +0018 DO_ICALL +0019 JMP 0005 +0020 FE_FREE V1 +0021 RETURN int(1) +LIVE RANGES: + 1: 0005 - 0020 (loop) + +test: + ; (lines=13, args=1, vars=1, tmps=0) + ; (after optimizer) + ; %s.php:3-17 +0000 CV0($value) = RECV 1 +0001 MATCH CV0($value) 1: 0002, "1": 0003, 2: 0004, "2": 0005, 3: 0006, "3": 0007, 4: 0008, "4": 0009, 5: 0010, "5": 0011, default: 0012 +0002 RETURN string("1 int") +0003 RETURN string("1 string") +0004 RETURN string("2 int") +0005 RETURN string("2 string") +0006 RETURN string("3 int") +0007 RETURN string("3 string") +0008 RETURN string("4 int") +0009 RETURN string("4 string") +0010 RETURN string("5 int") +0011 RETURN string("5 string") +0012 RETURN string("default") +string(7) "default" +string(7) "default" +string(5) "1 int" +string(8) "1 string" +string(5) "2 int" +string(8) "2 string" +string(5) "3 int" +string(8) "3 string" +string(5) "4 int" +string(8) "4 string" +string(5) "5 int" +string(8) "5 string" +string(7) "default" +string(7) "default" diff --git a/ext/opcache/tests/optimize_static_001.phpt b/ext/opcache/tests/optimize_static_001.phpt index aac2d719074d8..200c9fe92058c 100644 --- a/ext/opcache/tests/optimize_static_001.phpt +++ b/ext/opcache/tests/optimize_static_001.phpt @@ -19,5 +19,5 @@ try { ?> OK --EXPECT-- -Exception: Undefined constant 'UNDEFINED_CONST' -OK \ No newline at end of file +Exception: Undefined constant "UNDEFINED_CONST" +OK diff --git a/ext/opcache/tests/preload_004.phpt b/ext/opcache/tests/preload_004.phpt index 5e36488ee8c4e..c61a73134d011 100644 --- a/ext/opcache/tests/preload_004.phpt +++ b/ext/opcache/tests/preload_004.phpt @@ -15,6 +15,6 @@ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows var_dump(class_exists('Foo')); ?> --EXPECT-- -Fatal error: Undefined class constant 'self::DOES_NOT_EXIST' in Unknown on line 0 +Fatal error: Undefined constant self::DOES_NOT_EXIST in Unknown on line 0 Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0 diff --git a/ext/opcache/tests/preload_009.phpt b/ext/opcache/tests/preload_009.phpt index b50e921c07b9c..c28bab88fed18 100644 --- a/ext/opcache/tests/preload_009.phpt +++ b/ext/opcache/tests/preload_009.phpt @@ -16,6 +16,6 @@ var_dump(trait_exists('T')); var_dump(class_exists('Foo')); ?> --EXPECT-- -Fatal error: Undefined constant 'UNDEF' in Unknown on line 0 +Fatal error: Undefined constant "UNDEF" in Unknown on line 0 Fatal error: Failed to resolve initializers of class Foo during preloading in Unknown on line 0 diff --git a/ext/opcache/tests/preload_loadable_classes_2.phpt b/ext/opcache/tests/preload_loadable_classes_2.phpt index 1c34ebc5c05d8..b64102a8fc949 100644 --- a/ext/opcache/tests/preload_loadable_classes_2.phpt +++ b/ext/opcache/tests/preload_loadable_classes_2.phpt @@ -13,6 +13,6 @@ if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows --FILE-- Unreachable --EXPECT-- -Fatal error: Undefined constant 'UNDEF' in Unknown on line 0 +Fatal error: Undefined constant "UNDEF" in Unknown on line 0 Fatal error: Failed to resolve initializers of class Test during preloading in Unknown on line 0 diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 15ade4ce3c079..379f3fa9a1d22 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -547,6 +547,7 @@ static void zend_file_cache_serialize_op_array(zend_op_array *op_arra case ZEND_FE_FETCH_RW: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: /* relative extended_value don't have to be changed */ break; } diff --git a/ext/opcache/zend_persist.c b/ext/opcache/zend_persist.c index ae997b9a60907..e6b5194bfeb10 100644 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@ -549,6 +549,7 @@ static void zend_persist_op_array_ex(zend_op_array *op_array, zend_persistent_sc case ZEND_FE_FETCH_RW: case ZEND_SWITCH_LONG: case ZEND_SWITCH_STRING: + case ZEND_MATCH: /* relative extended_value don't have to be changed */ break; } diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 16ec75d02b2d7..8138dd5e69996 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2060,48 +2060,46 @@ static zend_always_inline zend_string *php_pcre_replace_func(zend_string *regex, /* }}} */ /* {{{ php_pcre_replace_array */ -static zend_string *php_pcre_replace_array(HashTable *regex, zval *replace, zend_string *subject_str, size_t limit, size_t *replace_count) +static zend_string *php_pcre_replace_array(HashTable *regex, + zend_string *replace_str, HashTable *replace_ht, + zend_string *subject_str, size_t limit, size_t *replace_count) { zval *regex_entry; zend_string *result; - zend_string *replace_str, *tmp_replace_str; - if (Z_TYPE_P(replace) == IS_ARRAY) { + zend_string_addref(subject_str); + + if (replace_ht) { uint32_t replace_idx = 0; - HashTable *replace_ht = Z_ARRVAL_P(replace); /* For each entry in the regex array, get the entry */ ZEND_HASH_FOREACH_VAL(regex, regex_entry) { /* Make sure we're dealing with strings. */ zend_string *tmp_regex_str; zend_string *regex_str = zval_get_tmp_string(regex_entry, &tmp_regex_str); + zend_string *replace_entry_str, *tmp_replace_entry_str; zval *zv; /* Get current entry */ while (1) { if (replace_idx == replace_ht->nNumUsed) { - replace_str = ZSTR_EMPTY_ALLOC(); - tmp_replace_str = NULL; + replace_entry_str = ZSTR_EMPTY_ALLOC(); + tmp_replace_entry_str = NULL; break; } zv = &replace_ht->arData[replace_idx].val; replace_idx++; if (Z_TYPE_P(zv) != IS_UNDEF) { - replace_str = zval_get_tmp_string(zv, &tmp_replace_str); + replace_entry_str = zval_get_tmp_string(zv, &tmp_replace_entry_str); break; } } /* Do the actual replacement and put the result back into subject_str for further replacements. */ - result = php_pcre_replace(regex_str, - subject_str, - ZSTR_VAL(subject_str), - ZSTR_LEN(subject_str), - replace_str, - limit, - replace_count); - zend_tmp_string_release(tmp_replace_str); + result = php_pcre_replace(regex_str, subject_str, ZSTR_VAL(subject_str), + ZSTR_LEN(subject_str), replace_entry_str, limit, replace_count); + zend_tmp_string_release(tmp_replace_entry_str); zend_tmp_string_release(tmp_regex_str); zend_string_release_ex(subject_str, 0); subject_str = result; @@ -2111,7 +2109,7 @@ static zend_string *php_pcre_replace_array(HashTable *regex, zval *replace, zend } ZEND_HASH_FOREACH_END(); } else { - replace_str = Z_STR_P(replace); + ZEND_ASSERT(replace_str != NULL); /* For each entry in the regex array, get the entry */ ZEND_HASH_FOREACH_VAL(regex, regex_entry) { @@ -2121,13 +2119,8 @@ static zend_string *php_pcre_replace_array(HashTable *regex, zval *replace, zend /* Do the actual replacement and put the result back into subject_str for further replacements. */ - result = php_pcre_replace(regex_str, - subject_str, - ZSTR_VAL(subject_str), - ZSTR_LEN(subject_str), - replace_str, - limit, - replace_count); + result = php_pcre_replace(regex_str, subject_str, ZSTR_VAL(subject_str), + ZSTR_LEN(subject_str), replace_str, limit, replace_count); zend_tmp_string_release(tmp_regex_str); zend_string_release_ex(subject_str, 0); subject_str = result; @@ -2143,83 +2136,80 @@ static zend_string *php_pcre_replace_array(HashTable *regex, zval *replace, zend /* }}} */ /* {{{ php_replace_in_subject */ -static zend_always_inline zend_string *php_replace_in_subject(zval *regex, zval *replace, zval *subject, size_t limit, size_t *replace_count) +static zend_always_inline zend_string *php_replace_in_subject( + zend_string *regex_str, HashTable *regex_ht, + zend_string *replace_str, HashTable *replace_ht, + zend_string *subject, size_t limit, size_t *replace_count) { zend_string *result; - zend_string *subject_str = zval_get_string(subject); - - if (Z_TYPE_P(regex) != IS_ARRAY) { - result = php_pcre_replace(Z_STR_P(regex), - subject_str, - ZSTR_VAL(subject_str), - ZSTR_LEN(subject_str), - Z_STR_P(replace), - limit, - replace_count); - zend_string_release_ex(subject_str, 0); + + if (regex_str) { + ZEND_ASSERT(replace_str != NULL); + result = php_pcre_replace(regex_str, subject, ZSTR_VAL(subject), ZSTR_LEN(subject), + replace_str, limit, replace_count); } else { - result = php_pcre_replace_array(Z_ARRVAL_P(regex), - replace, - subject_str, - limit, - replace_count); + ZEND_ASSERT(regex_ht != NULL); + result = php_pcre_replace_array(regex_ht, replace_str, replace_ht, subject, + limit, replace_count); } return result; } /* }}} */ /* {{{ php_replace_in_subject_func */ -static zend_string *php_replace_in_subject_func(zval *regex, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *subject, size_t limit, size_t *replace_count, zend_long flags) +static zend_string *php_replace_in_subject_func(zend_string *regex_str, HashTable *regex_ht, + zend_fcall_info *fci, zend_fcall_info_cache *fcc, + zend_string *subject, size_t limit, size_t *replace_count, zend_long flags) { zend_string *result; - zend_string *subject_str = zval_get_string(subject); - if (Z_TYPE_P(regex) != IS_ARRAY) { + if (regex_str) { result = php_pcre_replace_func( - Z_STR_P(regex), subject_str, fci, fcc, limit, replace_count, flags); - zend_string_release_ex(subject_str, 0); + regex_str, subject, fci, fcc, limit, replace_count, flags); return result; } else { + /* If regex is an array */ zval *regex_entry; - /* If regex is an array */ + ZEND_ASSERT(regex_ht != NULL); + + zend_string_addref(subject); /* For each entry in the regex array, get the entry */ - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(regex), regex_entry) { + ZEND_HASH_FOREACH_VAL(regex_ht, regex_entry) { /* Make sure we're dealing with strings. */ - zend_string *tmp_regex_str; - zend_string *regex_str = zval_get_tmp_string(regex_entry, &tmp_regex_str); + zend_string *tmp_regex_entry_str; + zend_string *regex_entry_str = zval_get_tmp_string(regex_entry, &tmp_regex_entry_str); - /* Do the actual replacement and put the result back into subject_str + /* Do the actual replacement and put the result back into subject for further replacements. */ result = php_pcre_replace_func( - regex_str, subject_str, fci, fcc, limit, replace_count, flags); - zend_tmp_string_release(tmp_regex_str); - zend_string_release_ex(subject_str, 0); - subject_str = result; + regex_entry_str, subject, fci, fcc, limit, replace_count, flags); + zend_tmp_string_release(tmp_regex_entry_str); + zend_string_release(subject); + subject = result; if (UNEXPECTED(result == NULL)) { break; } } ZEND_HASH_FOREACH_END(); - return subject_str; + return subject; } } /* }}} */ /* {{{ preg_replace_func_impl */ -static size_t preg_replace_func_impl(zval *return_value, zval *regex, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *subject, zend_long limit_val, zend_long flags) +static size_t preg_replace_func_impl(zval *return_value, + zend_string *regex_str, HashTable *regex_ht, + zend_fcall_info *fci, zend_fcall_info_cache *fcc, + zend_string *subject_str, HashTable *subject_ht, zend_long limit_val, zend_long flags) { zend_string *result; size_t replace_count = 0; - if (Z_TYPE_P(regex) != IS_ARRAY) { - convert_to_string_ex(regex); - } - - if (Z_TYPE_P(subject) != IS_ARRAY) { + if (subject_str) { result = php_replace_in_subject_func( - regex, fci, fcc, subject, limit_val, &replace_count, flags); + regex_str, regex_ht, fci, fcc, subject_str, limit_val, &replace_count, flags); if (result != NULL) { RETVAL_STR(result); } else { @@ -2231,13 +2221,18 @@ static size_t preg_replace_func_impl(zval *return_value, zval *regex, zend_fcall zend_string *string_key; zend_ulong num_key; - array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(subject))); + ZEND_ASSERT(subject_ht != NULL); + + array_init_size(return_value, zend_hash_num_elements(subject_ht)); /* For each subject entry, convert it to string, then perform replacement and add the result to the return_value array. */ - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(subject), num_key, string_key, subject_entry) { + ZEND_HASH_FOREACH_KEY_VAL(subject_ht, num_key, string_key, subject_entry) { + zend_string *tmp_subject_entry_str; + zend_string *subject_entry_str = zval_get_tmp_string(subject_entry, &tmp_subject_entry_str); + result = php_replace_in_subject_func( - regex, fci, fcc, subject_entry, limit_val, &replace_count, flags); + regex_str, regex_ht, fci, fcc, subject_entry_str, limit_val, &replace_count, flags); if (result != NULL) { /* Add to return array */ ZVAL_STR(&zv, result); @@ -2247,6 +2242,7 @@ static size_t preg_replace_func_impl(zval *return_value, zval *regex, zend_fcall zend_hash_index_add_new(Z_ARRVAL_P(return_value), num_key, &zv); } } + zend_tmp_string_release(tmp_subject_entry_str); } ZEND_HASH_FOREACH_END(); } @@ -2255,9 +2251,15 @@ static size_t preg_replace_func_impl(zval *return_value, zval *regex, zend_fcall /* }}} */ /* {{{ preg_replace_common */ -static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) +static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, bool is_filter) { - zval *regex, *replace, *subject, *zcount = NULL; + zval *zcount = NULL; + zend_string *regex_str; + HashTable *regex_ht; + zend_string *replace_str; + HashTable *replace_ht; + zend_string *subject_str; + HashTable *subject_ht; zend_long limit = -1; size_t replace_count = 0; zend_string *result; @@ -2265,33 +2267,24 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) /* Get function parameters and do error-checking. */ ZEND_PARSE_PARAMETERS_START(3, 5) - Z_PARAM_ZVAL(regex) - Z_PARAM_ZVAL(replace) - Z_PARAM_ZVAL(subject) + Z_PARAM_STR_OR_ARRAY_HT(regex_str, regex_ht) + Z_PARAM_STR_OR_ARRAY_HT(replace_str, replace_ht) + Z_PARAM_STR_OR_ARRAY_HT(subject_str, subject_ht) Z_PARAM_OPTIONAL Z_PARAM_LONG(limit) Z_PARAM_ZVAL(zcount) ZEND_PARSE_PARAMETERS_END(); - if (Z_TYPE_P(replace) != IS_ARRAY) { - convert_to_string_ex(replace); - if (Z_TYPE_P(regex) != IS_ARRAY) { - convert_to_string_ex(regex); - } - } else { - if (Z_TYPE_P(regex) != IS_ARRAY) { - zend_argument_type_error(1, "must be of type array when argument #2 ($replace) is an array, %s given", zend_zval_type_name(regex)); - RETURN_THROWS(); - } + /* If replace is an array then the regex argument needs to also be an array */ + if (replace_ht && !regex_ht) { + zend_argument_type_error(1, "must be of type array when argument #2 ($replace) is an array, string given"); + RETURN_THROWS(); } - if (Z_TYPE_P(subject) != IS_ARRAY) { + if (subject_str) { old_replace_count = replace_count; - result = php_replace_in_subject(regex, - replace, - subject, - limit, - &replace_count); + result = php_replace_in_subject(regex_str, regex_ht, replace_str, replace_ht, + subject_str, limit, &replace_count); if (result != NULL) { if (!is_filter || replace_count > old_replace_count) { RETVAL_STR(result); @@ -2308,17 +2301,19 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) zend_string *string_key; zend_ulong num_key; - array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(subject))); + ZEND_ASSERT(subject_ht != NULL); + + array_init_size(return_value, zend_hash_num_elements(subject_ht)); /* For each subject entry, convert it to string, then perform replacement and add the result to the return_value array. */ - ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(subject), num_key, string_key, subject_entry) { + ZEND_HASH_FOREACH_KEY_VAL(subject_ht, num_key, string_key, subject_entry) { old_replace_count = replace_count; - result = php_replace_in_subject(regex, - replace, - subject_entry, - limit, - &replace_count); + zend_string *tmp_subject_entry_str; + zend_string *subject_entry_str = zval_get_tmp_string(subject_entry, &tmp_subject_entry_str); + result = php_replace_in_subject(regex_str, regex_ht, replace_str, replace_ht, + subject_entry_str, limit, &replace_count); + if (result != NULL) { if (!is_filter || replace_count > old_replace_count) { /* Add to return array */ @@ -2332,6 +2327,7 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) zend_string_release_ex(result, 0); } } + zend_tmp_string_release(tmp_subject_entry_str); } ZEND_HASH_FOREACH_END(); } @@ -2344,14 +2340,18 @@ static void preg_replace_common(INTERNAL_FUNCTION_PARAMETERS, int is_filter) /* {{{ Perform Perl-style regular expression replacement. */ PHP_FUNCTION(preg_replace) { - preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); + preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, false); } /* }}} */ /* {{{ Perform Perl-style regular expression replacement using replacement callback. */ PHP_FUNCTION(preg_replace_callback) { - zval *regex, *subject, *zcount = NULL; + zval *zcount = NULL; + zend_string *regex_str; + HashTable *regex_ht; + zend_string *subject_str; + HashTable *subject_ht; zend_long limit = -1, flags = 0; size_t replace_count; zend_fcall_info fci; @@ -2359,16 +2359,18 @@ PHP_FUNCTION(preg_replace_callback) /* Get function parameters and do error-checking. */ ZEND_PARSE_PARAMETERS_START(3, 6) - Z_PARAM_ZVAL(regex) + Z_PARAM_STR_OR_ARRAY_HT(regex_str, regex_ht) Z_PARAM_FUNC(fci, fcc) - Z_PARAM_ZVAL(subject) + Z_PARAM_STR_OR_ARRAY_HT(subject_str, subject_ht) Z_PARAM_OPTIONAL Z_PARAM_LONG(limit) Z_PARAM_ZVAL(zcount) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); - replace_count = preg_replace_func_impl(return_value, regex, &fci, &fcc, subject, limit, flags); + replace_count = preg_replace_func_impl(return_value, regex_str, regex_ht, + &fci, &fcc, + subject_str, subject_ht, limit, flags); if (zcount) { ZEND_TRY_ASSIGN_REF_LONG(zcount, replace_count); } @@ -2378,16 +2380,17 @@ PHP_FUNCTION(preg_replace_callback) /* {{{ Perform Perl-style regular expression replacement using replacement callback. */ PHP_FUNCTION(preg_replace_callback_array) { - zval regex, zv, *replace, *subject, *pattern, *zcount = NULL; + zval zv, *replace, *subject, *zcount = NULL; + HashTable *pattern; + zend_string *str_idx_regex; zend_long limit = -1, flags = 0; - zend_string *str_idx; size_t replace_count = 0; zend_fcall_info fci; zend_fcall_info_cache fcc; /* Get function parameters and do error-checking. */ ZEND_PARSE_PARAMETERS_START(2, 5) - Z_PARAM_ARRAY(pattern) + Z_PARAM_ARRAY_HT(pattern) Z_PARAM_ZVAL(subject) Z_PARAM_OPTIONAL Z_PARAM_LONG(limit) @@ -2398,10 +2401,8 @@ PHP_FUNCTION(preg_replace_callback_array) fci.size = sizeof(fci); fci.object = NULL; - ZEND_HASH_FOREACH_STR_KEY_VAL(Z_ARRVAL_P(pattern), str_idx, replace) { - if (str_idx) { - ZVAL_STR_COPY(®ex, str_idx); - } else { + ZEND_HASH_FOREACH_STR_KEY_VAL(pattern, str_idx_regex, replace) { + if (!str_idx_regex) { php_error_docref(NULL, E_WARNING, "Delimiter must not be alphanumeric or backslash"); zval_ptr_dtor(return_value); RETURN_NULL(); @@ -2409,25 +2410,23 @@ PHP_FUNCTION(preg_replace_callback_array) if (!zend_is_callable_ex(replace, NULL, 0, NULL, &fcc, NULL)) { zend_string *callback_name = zend_get_callable_name(replace); - php_error_docref(NULL, E_WARNING, "'%s' is not a valid callback", ZSTR_VAL(callback_name)); + zend_type_error("'%s' is not a valid callback", ZSTR_VAL(callback_name)); zend_string_release_ex(callback_name, 0); - zval_ptr_dtor(®ex); - zval_ptr_dtor(return_value); - ZVAL_COPY(return_value, subject); - return; + RETURN_THROWS(); } ZVAL_COPY_VALUE(&fci.function_name, replace); - replace_count += preg_replace_func_impl(&zv, ®ex, &fci, &fcc, subject, limit, flags); + replace_count += preg_replace_func_impl(&zv, str_idx_regex, /* regex_ht */ NULL, &fci, &fcc, + Z_STR_P(subject), Z_ARRVAL_P(subject), + limit, flags); + if (subject != return_value) { subject = return_value; } else { zval_ptr_dtor(return_value); } - zval_ptr_dtor(®ex); - ZVAL_COPY_VALUE(return_value, &zv); if (UNEXPECTED(EG(exception))) { @@ -2445,7 +2444,7 @@ PHP_FUNCTION(preg_replace_callback_array) /* {{{ Perform Perl-style regular expression replacement and only return matches. */ PHP_FUNCTION(preg_filter) { - preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); + preg_replace_common(INTERNAL_FUNCTION_PARAM_PASSTHRU, true); } /* }}} */ diff --git a/ext/pcre/php_pcre.stub.php b/ext/pcre/php_pcre.stub.php index 58bc5c378f29f..97f08eec0fcfa 100644 --- a/ext/pcre/php_pcre.stub.php +++ b/ext/pcre/php_pcre.stub.php @@ -6,32 +6,17 @@ function preg_match(string $pattern, string $subject, &$subpatterns = null, int function preg_match_all(string $pattern, string $subject, &$subpatterns = null, int $flags = 0, int $offset = 0): int|false|null {} -/** - * @param string|array $regex - * @param string|array $replace - * @param string|array $subject - */ -function preg_replace($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {} - -/** - * @param string|array $regex - * @param string|array $replace - * @param string|array $subject - */ -function preg_filter($regex, $replace, $subject, int $limit = -1, &$count = null): string|array|null {} - -/** - * @param string|array $regex - * @param string|array $subject - */ -function preg_replace_callback($regex, callable $callback, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {} +function preg_replace(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {} + +function preg_filter(string|array $regex, string|array $replace, string|array $subject, int $limit = -1, &$count = null): string|array|null {} + +function preg_replace_callback(string|array $regex, callable $callback, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {} /** @param string|array $subject */ function preg_replace_callback_array(array $pattern, $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {} function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {} - function preg_quote(string $str, ?string $delim_char = null): string {} function preg_grep(string $regex, array $input, int $flags = 0): array|false {} diff --git a/ext/pcre/php_pcre_arginfo.h b/ext/pcre/php_pcre_arginfo.h index b63bfd5856e06..678fdd69a4088 100644 --- a/ext/pcre/php_pcre_arginfo.h +++ b/ext/pcre/php_pcre_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 2e7402e33a485cd3c1a74c0d6210214b3e7c4e9a */ + * Stub hash: 88e664fe3f4714ab7760a99bffef5c11eafcf0aa */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match, 0, 2, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 0) @@ -18,9 +18,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_match_all, 0, 2, MAY_BE_LON ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL) - ZEND_ARG_INFO(0, regex) - ZEND_ARG_INFO(0, replace) - ZEND_ARG_INFO(0, subject) + ZEND_ARG_TYPE_MASK(0, regex, MAY_BE_STRING|MAY_BE_ARRAY, NULL) + ZEND_ARG_TYPE_MASK(0, replace, MAY_BE_STRING|MAY_BE_ARRAY, NULL) + ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") ZEND_END_ARG_INFO() @@ -28,9 +28,9 @@ ZEND_END_ARG_INFO() #define arginfo_preg_filter arginfo_preg_replace ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_preg_replace_callback, 0, 3, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_NULL) - ZEND_ARG_INFO(0, regex) + ZEND_ARG_TYPE_MASK(0, regex, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 0) - ZEND_ARG_INFO(0, subject) + ZEND_ARG_TYPE_MASK(0, subject, MAY_BE_STRING|MAY_BE_ARRAY, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, limit, IS_LONG, 0, "-1") ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, count, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt index f333d06dcb4e2..679a4b0c54ec2 100644 --- a/ext/pcre/tests/preg_replace_callback_array2.phpt +++ b/ext/pcre/tests/preg_replace_callback_array2.phpt @@ -5,7 +5,14 @@ preg_replace_callback_array() errors $a = array(); $b = ""; -var_dump(preg_replace_callback_array(array("xx" => "s"), $a, -1, $b)); + +try { + var_dump(preg_replace_callback_array(array("xx" => "s"), $a, -1, $b)); +} catch (\TypeError $e) { + echo $e->getMessage() . \PHP_EOL; +} + + var_dump($b); function f() { static $count = 1; @@ -23,9 +30,7 @@ try { echo "Done\n"; ?> --EXPECTF-- -Warning: preg_replace_callback_array(): 's' is not a valid callback in %spreg_replace_callback_array2.php on line %d -array(0) { -} +'s' is not a valid callback string(0) "" Warning: preg_replace_callback_array(): No ending delimiter '/' found in %spreg_replace_callback_array2.php on line %d diff --git a/ext/pcre/tests/preg_replace_error1.phpt b/ext/pcre/tests/preg_replace_error1.phpt index 39d0b692e72ee..58cd049691a97 100644 --- a/ext/pcre/tests/preg_replace_error1.phpt +++ b/ext/pcre/tests/preg_replace_error1.phpt @@ -56,4 +56,4 @@ string(1) "a" Arg value is /[a-zA-Z]/ string(1) "1" -Object of class stdClass could not be converted to string +preg_replace(): Argument #1 ($regex) must be of type string|array, stdClass given diff --git a/ext/pcre/tests/preg_replace_error2.phpt b/ext/pcre/tests/preg_replace_error2.phpt index 0aefff9df64a3..9a3056ab882ad 100644 --- a/ext/pcre/tests/preg_replace_error2.phpt +++ b/ext/pcre/tests/preg_replace_error2.phpt @@ -36,5 +36,5 @@ string(64) "this is a stringthis is a stringthis is a stringthis is a string" Arg value is: Array preg_replace(): Argument #1 ($regex) must be of type array when argument #2 ($replace) is an array, string given -Object of class stdClass could not be converted to string +preg_replace(): Argument #2 ($replace) must be of type string|array, stdClass given Done diff --git a/ext/pdo/tests/bug_47769.phpt b/ext/pdo/tests/bug_47769.phpt index 1c4395cc4bf10..2c308d9113213 100644 --- a/ext/pdo/tests/bug_47769.phpt +++ b/ext/pdo/tests/bug_47769.phpt @@ -34,7 +34,7 @@ this is a protected method. this is a private method. foo -Fatal error: Uncaught Error: Call to protected method test::isProtected() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method test::isProtected() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/pdo_mysql/tests/bug44327.phpt b/ext/pdo_mysql/tests/bug44327.phpt index 4b0b7d9bd019c..8fa0025dd6261 100644 --- a/ext/pdo_mysql/tests/bug44327.phpt +++ b/ext/pdo_mysql/tests/bug44327.phpt @@ -60,5 +60,5 @@ object(PDORow)#%d (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 bool in %s on line %d NULL diff --git a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt index 4463dbb3ecdf4..2d0dfc3e5d752 100644 --- a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt +++ b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt @@ -92,12 +92,12 @@ array(2) { string(0) "" } -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function 'nothing' not found or invalid function name in %s on line %d +Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "nothing" not found or invalid function name in %s on line %d Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function '' not found or invalid function name in %s on line %d +Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: function "" not found or invalid function name in %s on line %d Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) @@ -112,7 +112,7 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: no array or s Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'PDOStatement' does not have a method 'foo' in %s on line %d +Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class PDOStatement does not have a method "foo" in %s on line %d Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) @@ -139,7 +139,7 @@ Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: non-static me Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) -Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class 'bar' does not have a method 'inexistent' in %s on line %d +Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error: class bar does not have a method "inexistent" in %s on line %d Warning: PDOStatement::fetchAll(): SQLSTATE[HY000]: General error in %s on line %d bool(false) diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt index c050859b864ba..5aefaaaa59c4d 100644 --- a/ext/phar/tests/phar_oo_006.phpt +++ b/ext/phar/tests/phar_oo_006.phpt @@ -40,7 +40,7 @@ unlink(__DIR__ . '/files/phar_oo_006.phar.php'); __halt_compiler(); ?> --EXPECTF-- -SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'SplFileInfo' given +SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, SplFileInfo given MyFile::__construct(phar://%s/a.php) a.php MyFile::__construct(phar://%s/b/c.php) diff --git a/ext/readline/tests/bug77812-libedit.phpt b/ext/readline/tests/bug77812-libedit.phpt index 0c68a2d5c82af..a5e39f05ae7f8 100644 --- a/ext/readline/tests/bug77812-libedit.phpt +++ b/ext/readline/tests/bug77812-libedit.phpt @@ -29,7 +29,7 @@ bar xx xxx -Warning: Uncaught Error: Undefined constant 'FOO' in php shell code:1 +Warning: Uncaught Error: Undefined constant "FOO" in php shell code:1 Stack trace: #0 {main} thrown in php shell code on line 1 diff --git a/ext/readline/tests/bug77812-readline.phpt b/ext/readline/tests/bug77812-readline.phpt index a3917ccaba508..335797aa6667f 100644 --- a/ext/readline/tests/bug77812-readline.phpt +++ b/ext/readline/tests/bug77812-readline.phpt @@ -40,7 +40,7 @@ xxx php > FOO php > ; -Warning: Uncaught Error: Undefined constant 'FOO' in php shell code:1 +Warning: Uncaught Error: Undefined constant "FOO" in php shell code:1 Stack trace: #0 {main} thrown in php shell code on line 1 diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 9b8c34e4ddd64..c751da1281244 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1167,7 +1167,7 @@ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attribut if (name && (flags & REFLECTION_ATTRIBUTE_IS_INSTANCEOF)) { if (NULL == (base = zend_lookup_class(name))) { if (!EG(exception)) { - zend_throw_error(NULL, "Class '%s' not found", ZSTR_VAL(name)); + zend_throw_error(NULL, "Class \"%s\" not found", ZSTR_VAL(name)); } RETURN_THROWS(); @@ -2281,7 +2281,7 @@ ZEND_METHOD(ReflectionParameter, __construct) } if ((ce = zend_lookup_class(name)) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", ZSTR_VAL(name)); + "Class \"%s\" does not exist", ZSTR_VAL(name)); zend_string_release(name); RETURN_THROWS(); } @@ -2513,19 +2513,19 @@ ZEND_METHOD(ReflectionParameter, getClass) ce = param->fptr->common.scope; if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Parameter uses 'self' as type hint but function is not a class member!"); + "Parameter uses \"self\" as type but function is not a class member"); RETURN_THROWS(); } } else if (0 == zend_binary_strcasecmp(ZSTR_VAL(class_name), ZSTR_LEN(class_name), "parent", sizeof("parent")- 1)) { ce = param->fptr->common.scope; if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Parameter uses 'parent' as type hint but function is not a class member!"); + "Parameter uses \"parent\" as type but function is not a class member"); RETURN_THROWS(); } if (!ce->parent) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Parameter uses 'parent' as type hint although class does not have a parent!"); + "Parameter uses \"parent\" as type although class does not have a parent"); RETURN_THROWS(); } ce = ce->parent; @@ -2533,7 +2533,7 @@ ZEND_METHOD(ReflectionParameter, getClass) ce = zend_lookup_class(class_name); if (!ce) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", ZSTR_VAL(class_name)); + "Class \"%s\" does not exist", ZSTR_VAL(class_name)); RETURN_THROWS(); } } @@ -3023,7 +3023,7 @@ ZEND_METHOD(ReflectionMethod, __construct) if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) { if (!EG(exception)) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", Z_STRVAL_P(classname)); + "Class \"%s\" does not exist", Z_STRVAL_P(classname)); } if (classname == &ztmp) { zval_ptr_dtor_str(&ztmp); @@ -3537,7 +3537,7 @@ ZEND_METHOD(ReflectionClassConstant, __construct) case IS_STRING: if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", Z_STRVAL_P(classname)); + "Class \"%s\" does not exist", Z_STRVAL_P(classname)); RETURN_THROWS(); } break; @@ -3552,7 +3552,7 @@ ZEND_METHOD(ReflectionClassConstant, __construct) } if ((constant = zend_hash_find_ptr(&ce->constants_table, constname)) == NULL) { - zend_throw_exception_ex(reflection_exception_ptr, 0, "Class Constant %s::%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(constname)); + zend_throw_exception_ex(reflection_exception_ptr, 0, "Constant %s::%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(constname)); RETURN_THROWS(); } @@ -3739,7 +3739,7 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob if ((ce = zend_lookup_class(Z_STR_P(argument))) == NULL) { if (!EG(exception)) { - zend_throw_exception_ex(reflection_exception_ptr, -1, "Class %s does not exist", Z_STRVAL_P(argument)); + zend_throw_exception_ex(reflection_exception_ptr, -1, "Class \"%s\" does not exist", Z_STRVAL_P(argument)); } RETURN_THROWS(); } @@ -3876,7 +3876,7 @@ ZEND_METHOD(ReflectionClass, getStaticPropertyValue) ZVAL_COPY(return_value, def_value); } else { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not have a property named %s", ZSTR_VAL(ce->name), ZSTR_VAL(name)); + "Property %s::$%s does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name)); } return; } else { @@ -4173,7 +4173,7 @@ ZEND_METHOD(ReflectionClass, getMethod) reflection_method_factory(ce, mptr, NULL, return_value); } else { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Method %s does not exist", ZSTR_VAL(name)); + "Method %s::%s() does not exist", ZSTR_VAL(ce->name), ZSTR_VAL(name)); } zend_string_release(lc_name); } @@ -4307,7 +4307,7 @@ ZEND_METHOD(ReflectionClass, getProperty) ce2 = zend_lookup_class(classname); if (!ce2) { if (!EG(exception)) { - zend_throw_exception_ex(reflection_exception_ptr, -1, "Class %s does not exist", ZSTR_VAL(classname)); + zend_throw_exception_ex(reflection_exception_ptr, -1, "Class \"%s\" does not exist", ZSTR_VAL(classname)); } zend_string_release_ex(classname, 0); RETURN_THROWS(); @@ -4315,7 +4315,7 @@ ZEND_METHOD(ReflectionClass, getProperty) zend_string_release_ex(classname, 0); if (!instanceof_function(ce, ce2)) { - zend_throw_exception_ex(reflection_exception_ptr, -1, "Fully qualified property name %s::%s does not specify a base class of %s", ZSTR_VAL(ce2->name), str_name, ZSTR_VAL(ce->name)); + zend_throw_exception_ex(reflection_exception_ptr, -1, "Fully qualified property name %s::$%s does not specify a base class of %s", ZSTR_VAL(ce2->name), str_name, ZSTR_VAL(ce->name)); RETURN_THROWS(); } ce = ce2; @@ -4328,8 +4328,7 @@ ZEND_METHOD(ReflectionClass, getProperty) return; } } - zend_throw_exception_ex(reflection_exception_ptr, 0, - "Property %s does not exist", str_name); + zend_throw_exception_ex(reflection_exception_ptr, 0, "Property %s::$%s does not exist", ZSTR_VAL(ce->name), str_name); } /* }}} */ @@ -4980,7 +4979,7 @@ ZEND_METHOD(ReflectionClass, isSubclassOf) case IS_STRING: if ((class_ce = zend_lookup_class(Z_STR_P(class_name))) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", Z_STRVAL_P(class_name)); + "Class \"%s\" does not exist", Z_STRVAL_P(class_name)); RETURN_THROWS(); } break; @@ -5021,7 +5020,7 @@ ZEND_METHOD(ReflectionClass, implementsInterface) case IS_STRING: if ((interface_ce = zend_lookup_class(Z_STR_P(interface))) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Interface %s does not exist", Z_STRVAL_P(interface)); + "Interface \"%s\" does not exist", Z_STRVAL_P(interface)); RETURN_THROWS(); } break; @@ -5200,7 +5199,7 @@ ZEND_METHOD(ReflectionProperty, __construct) case IS_STRING: if ((ce = zend_lookup_class(Z_STR_P(classname))) == NULL) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Class %s does not exist", Z_STRVAL_P(classname)); + "Class \"%s\" does not exist", Z_STRVAL_P(classname)); RETURN_THROWS(); } break; @@ -5372,7 +5371,7 @@ ZEND_METHOD(ReflectionProperty, getValue) if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", + "Cannot access non-public property %s::$%s", ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } @@ -5422,7 +5421,7 @@ ZEND_METHOD(ReflectionProperty, setValue) if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", + "Cannot access non-public property %s::$%s", ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } @@ -5461,7 +5460,7 @@ ZEND_METHOD(ReflectionProperty, isInitialized) if (!(prop_get_flags(ref) & ZEND_ACC_PUBLIC) && intern->ignore_visibility == 0) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Cannot access non-public member %s::$%s", + "Cannot access non-public property %s::$%s", ZSTR_VAL(intern->ce->name), ZSTR_VAL(ref->unmangled_name)); RETURN_THROWS(); } @@ -5681,7 +5680,7 @@ ZEND_METHOD(ReflectionExtension, __construct) if ((module = zend_hash_str_find_ptr(&module_registry, lcname, name_len)) == NULL) { free_alloca(lcname, use_heap); zend_throw_exception_ex(reflection_exception_ptr, 0, - "Extension %s does not exist", name_str); + "Extension \"%s\" does not exist", name_str); RETURN_THROWS(); } free_alloca(lcname, use_heap); @@ -6017,7 +6016,7 @@ ZEND_METHOD(ReflectionZendExtension, __construct) extension = zend_get_extension(name_str); if (!extension) { zend_throw_exception_ex(reflection_exception_ptr, 0, - "Zend Extension %s does not exist", name_str); + "Zend Extension \"%s\" does not exist", name_str); RETURN_THROWS(); } ZVAL_STRING(reflection_prop_name(object), extension->name); @@ -6313,7 +6312,7 @@ static int call_attribute_constructor(zend_class_entry *ce, zend_object *obj, zv ZEND_ASSERT(ctor != NULL); if (!(ctor->common.fn_flags & ZEND_ACC_PUBLIC)) { - zend_throw_error(NULL, "Attribute constructor of class '%s' must be public", ZSTR_VAL(ce->name)); + zend_throw_error(NULL, "Attribute constructor of class %s must be public", ZSTR_VAL(ce->name)); return FAILURE; } @@ -6366,12 +6365,12 @@ ZEND_METHOD(ReflectionAttribute, newInstance) GET_REFLECTION_OBJECT_PTR(attr); if (NULL == (ce = zend_lookup_class(attr->data->name))) { - zend_throw_error(NULL, "Attribute class '%s' not found", ZSTR_VAL(attr->data->name)); + zend_throw_error(NULL, "Attribute class \"%s\" not found", ZSTR_VAL(attr->data->name)); RETURN_THROWS(); } if (NULL == (marker = zend_get_attribute_str(ce->attributes, ZEND_STRL("attribute")))) { - zend_throw_error(NULL, "Attempting to use non-attribute class '%s' as attribute", ZSTR_VAL(attr->data->name)); + zend_throw_error(NULL, "Attempting to use non-attribute class \"%s\" as attribute", ZSTR_VAL(attr->data->name)); RETURN_THROWS(); } @@ -6434,7 +6433,7 @@ ZEND_METHOD(ReflectionAttribute, newInstance) } } else if (argc) { attribute_ctor_cleanup(&obj, args, argc); - zend_throw_error(NULL, "Attribute class '%s' does not have a constructor, cannot pass arguments", ZSTR_VAL(ce->name)); + zend_throw_error(NULL, "Attribute class %s does not have a constructor, cannot pass arguments", ZSTR_VAL(ce->name)); RETURN_THROWS(); } diff --git a/ext/reflection/tests/007.phpt b/ext/reflection/tests/007.phpt index df1d97eea9669..53622ec19ca3e 100644 --- a/ext/reflection/tests/007.phpt +++ b/ext/reflection/tests/007.phpt @@ -91,7 +91,7 @@ test('WithCtorWithArgs'); --EXPECTF-- ====>Class_does_not_exist {closure}(Class_does_not_exist) -string(41) "Class Class_does_not_exist does not exist" +string(43) "Class "Class_does_not_exist" does not exist" ====>NoCtor ====>newInstance() object(NoCtor)#%d (0) { @@ -148,4 +148,3 @@ array(2) { } object(WithCtorWithArgs)#%d (0) { } - diff --git a/ext/reflection/tests/008.phpt b/ext/reflection/tests/008.phpt index 0b9a867884eb3..99081c66df8fb 100644 --- a/ext/reflection/tests/008.phpt +++ b/ext/reflection/tests/008.phpt @@ -29,11 +29,11 @@ echo "Done\n"; --EXPECT-- string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name" string(91) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be a valid method name" -string(21) "Class does not exist" -string(22) "Class a does not exist" -string(21) "Class does not exist" -string(22) "Class a does not exist" -string(21) "Class does not exist" +string(23) "Class "" does not exist" +string(24) "Class "a" does not exist" +string(23) "Class "" does not exist" +string(24) "Class "a" does not exist" +string(23) "Class "" does not exist" string(104) "ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, int given" -string(21) "Class does not exist" +string(23) "Class "" does not exist" Done diff --git a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt index 414fac8543d5d..2ab8990d95282 100644 --- a/ext/reflection/tests/ReflectionClassConstant_basic1.phpt +++ b/ext/reflection/tests/ReflectionClassConstant_basic1.phpt @@ -154,7 +154,7 @@ bool(false) ********************************** -Fatal error: Uncaught ReflectionException: Class Constant TestClass::BAD_CONST does not exist in %s:%d +Fatal error: Uncaught ReflectionException: Constant TestClass::BAD_CONST does not exist in %s:%d Stack trace: #0 %s(%d): ReflectionClassConstant->__construct(Object(TestClass), 'BAD_CONST') #1 %s(%d): reflectClassConstant(Object(TestClass), 'BAD_CONST') diff --git a/ext/reflection/tests/ReflectionClass_constructor_002.phpt b/ext/reflection/tests/ReflectionClass_constructor_002.phpt index 3744fec06cfd0..54f4b8eda2cc4 100644 --- a/ext/reflection/tests/ReflectionClass_constructor_002.phpt +++ b/ext/reflection/tests/ReflectionClass_constructor_002.phpt @@ -47,11 +47,11 @@ try { ?> --EXPECTF-- ReflectionClass::__construct() expects exactly 1 parameter, 0 given -Class does not exist -Class 1 does not exist -Class 1 does not exist +Class "" does not exist +Class "1" does not exist +Class "1" does not exist Warning: Array to string conversion in %s on line %d -Class Array does not exist +Class "Array" does not exist ReflectionClass::__construct() expects exactly 1 parameter, 2 given -Class X does not exist +Class "X" does not exist diff --git a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt index c8a2ed14edfac..4e89466af021a 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_001.phpt @@ -65,7 +65,7 @@ Reflecting on class pubf: ["class"]=> string(4) "pubf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method pubf::doesNotExist() does not exist Reflecting on class subpubf: --> Check for f(): object(ReflectionMethod)#%d (2) { ["name"]=> @@ -85,7 +85,7 @@ Reflecting on class subpubf: ["class"]=> string(4) "pubf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method subpubf::doesNotExist() does not exist Reflecting on class protf: --> Check for f(): object(ReflectionMethod)#%d (2) { ["name"]=> @@ -105,7 +105,7 @@ Reflecting on class protf: ["class"]=> string(5) "protf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method protf::doesNotExist() does not exist Reflecting on class subprotf: --> Check for f(): object(ReflectionMethod)#%d (2) { ["name"]=> @@ -125,7 +125,7 @@ Reflecting on class subprotf: ["class"]=> string(5) "protf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method subprotf::doesNotExist() does not exist Reflecting on class privf: --> Check for f(): object(ReflectionMethod)#%d (2) { ["name"]=> @@ -145,7 +145,7 @@ Reflecting on class privf: ["class"]=> string(5) "privf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method privf::doesNotExist() does not exist Reflecting on class subprivf: --> Check for f(): object(ReflectionMethod)#%d (2) { ["name"]=> @@ -165,4 +165,4 @@ Reflecting on class subprivf: ["class"]=> string(5) "privf" } - --> Check for doesNotExist(): Method doesNotExist does not exist + --> Check for doesNotExist(): Method subprivf::doesNotExist() does not exist diff --git a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt index e5dce75367486..99d5bb7e86a61 100644 --- a/ext/reflection/tests/ReflectionClass_getMethod_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getMethod_002.phpt @@ -58,9 +58,9 @@ try { Check invalid params: ReflectionClass::getMethod() expects exactly 1 parameter, 0 given ReflectionClass::getMethod() expects exactly 1 parameter, 2 given -Method does not exist -Method 1 does not exist -Method 1.5 does not exist -Method 1 does not exist +Method C::() does not exist +Method C::1() does not exist +Method C::1.5() does not exist +Method C::1() does not exist ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, array given ReflectionClass::getMethod(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt index 2d5494b26445d..e2e6e3ba3cbe4 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_001.phpt @@ -72,8 +72,8 @@ Reflecting on class pubf: ["class"]=> string(4) "pubf" } - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for A: Property pubf::$A does not exist + --> Check for doesNotExist: Property pubf::$doesNotExist does not exist Reflecting on class subpubf: --> Check for s: object(ReflectionProperty)#%d (2) { ["name"]=> @@ -87,8 +87,8 @@ Reflecting on class subpubf: ["class"]=> string(4) "pubf" } - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for A: Property subpubf::$A does not exist + --> Check for doesNotExist: Property subpubf::$doesNotExist does not exist Reflecting on class protf: --> Check for s: object(ReflectionProperty)#%d (2) { ["name"]=> @@ -102,8 +102,8 @@ Reflecting on class protf: ["class"]=> string(5) "protf" } - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for A: Property protf::$A does not exist + --> Check for doesNotExist: Property protf::$doesNotExist does not exist Reflecting on class subprotf: --> Check for s: object(ReflectionProperty)#%d (2) { ["name"]=> @@ -117,8 +117,8 @@ Reflecting on class subprotf: ["class"]=> string(5) "protf" } - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for A: Property subprotf::$A does not exist + --> Check for doesNotExist: Property subprotf::$doesNotExist does not exist Reflecting on class privf: --> Check for s: object(ReflectionProperty)#%d (2) { ["name"]=> @@ -132,8 +132,8 @@ Reflecting on class privf: ["class"]=> string(5) "privf" } - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for A: Property privf::$A does not exist + --> Check for doesNotExist: Property privf::$doesNotExist does not exist Reflecting on class subprivf: --> Check for s: object(ReflectionProperty)#%d (2) { ["name"]=> @@ -141,6 +141,6 @@ Reflecting on class subprivf: ["class"]=> string(5) "privf" } - --> Check for a: Property a does not exist - --> Check for A: Property A does not exist - --> Check for doesNotExist: Property doesNotExist does not exist + --> Check for a: Property subprivf::$a does not exist + --> Check for A: Property subprivf::$A does not exist + --> Check for doesNotExist: Property subprivf::$doesNotExist does not exist diff --git a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt index 61d29b89d70e8..606a124d5cc5c 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_002.phpt @@ -56,9 +56,9 @@ try { Check invalid params: ReflectionClass::getProperty() expects exactly 1 parameter, 0 given ReflectionClass::getProperty() expects exactly 1 parameter, 2 given -Property does not exist -Property 1 does not exist -Property 1.5 does not exist -Property 1 does not exist +Property C::$ does not exist +Property C::$1 does not exist +Property C::$1.5 does not exist +Property C::$1 does not exist ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, array given ReflectionClass::getProperty(): Argument #1 ($name) must be of type string, C given diff --git a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt index 34ade2fc5e571..b3c2ceb88ade1 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_003.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_003.phpt @@ -110,9 +110,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member C::$protA +Cannot access non-public property C::$protA --- (Reflecting on privA) --- -Property privA does not exist +Property C::$privA does not exist --- (Reflecting on pubB) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -128,9 +128,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member C::$protB +Cannot access non-public property C::$protB --- (Reflecting on privB) --- -Property privB does not exist +Property C::$privB does not exist --- (Reflecting on pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$protC +Cannot access non-public property C::$protC --- (Reflecting on privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -154,9 +154,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$privC +Cannot access non-public property C::$privC --- (Reflecting on doesNotExist) --- -Property doesNotExist does not exist +Property C::$doesNotExist does not exist --- (Reflecting on A::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member A::$protC +Cannot access non-public property A::$protC --- (Reflecting on A::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member A::$privC +Cannot access non-public property A::$privC --- (Reflecting on B::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member B::$protC +Cannot access non-public property B::$protC --- (Reflecting on B::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member B::$privC +Cannot access non-public property B::$privC --- (Reflecting on c::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -214,7 +214,7 @@ object(ReflectionProperty)#%d (2) { } string(9) "pubC in C" --- (Reflecting on c::PUBC) --- -Property PUBC does not exist +Property C::$PUBC does not exist --- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$protC +Cannot access non-public property C::$protC --- (Reflecting on C::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -238,14 +238,14 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$privC +Cannot access non-public property C::$privC --- (Reflecting on X::pubC) --- -Fully qualified property name X::pubC does not specify a base class of C +Fully qualified property name X::$pubC does not specify a base class of C --- (Reflecting on X::protC) --- -Fully qualified property name X::protC does not specify a base class of C +Fully qualified property name X::$protC does not specify a base class of C --- (Reflecting on X::privC) --- -Fully qualified property name X::privC does not specify a base class of C +Fully qualified property name X::$privC does not specify a base class of C --- (Reflecting on X::doesNotExist) --- -Fully qualified property name X::doesNotExist does not specify a base class of C +Fully qualified property name X::$doesNotExist does not specify a base class of C --- (Reflecting on doesNotexist::doesNotExist) --- -Class doesnotexist does not exist +Class "doesnotexist" does not exist diff --git a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt index b5396aae40451..bbc9963d8ae84 100644 --- a/ext/reflection/tests/ReflectionClass_getProperty_004.phpt +++ b/ext/reflection/tests/ReflectionClass_getProperty_004.phpt @@ -110,9 +110,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member C::$protA +Cannot access non-public property C::$protA --- (Reflecting on privA) --- -Property privA does not exist +Property C::$privA does not exist --- (Reflecting on pubB) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -128,9 +128,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member C::$protB +Cannot access non-public property C::$protB --- (Reflecting on privB) --- -Property privB does not exist +Property C::$privB does not exist --- (Reflecting on pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -146,7 +146,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$protC +Cannot access non-public property C::$protC --- (Reflecting on privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -154,9 +154,9 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$privC +Cannot access non-public property C::$privC --- (Reflecting on doesNotExist) --- -Property doesNotExist does not exist +Property C::$doesNotExist does not exist --- (Reflecting on A::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -172,7 +172,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member A::$protC +Cannot access non-public property A::$protC --- (Reflecting on A::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -180,7 +180,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "A" } -Cannot access non-public member A::$privC +Cannot access non-public property A::$privC --- (Reflecting on B::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -196,7 +196,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member B::$protC +Cannot access non-public property B::$protC --- (Reflecting on B::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -204,7 +204,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "B" } -Cannot access non-public member B::$privC +Cannot access non-public property B::$privC --- (Reflecting on c::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -214,7 +214,7 @@ object(ReflectionProperty)#%d (2) { } string(9) "pubC in C" --- (Reflecting on c::PUBC) --- -Property PUBC does not exist +Property C::$PUBC does not exist --- (Reflecting on C::pubC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -230,7 +230,7 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$protC +Cannot access non-public property C::$protC --- (Reflecting on C::privC) --- object(ReflectionProperty)#%d (2) { ["name"]=> @@ -238,14 +238,14 @@ object(ReflectionProperty)#%d (2) { ["class"]=> string(1) "C" } -Cannot access non-public member C::$privC +Cannot access non-public property C::$privC --- (Reflecting on X::pubC) --- -Fully qualified property name X::pubC does not specify a base class of C +Fully qualified property name X::$pubC does not specify a base class of C --- (Reflecting on X::protC) --- -Fully qualified property name X::protC does not specify a base class of C +Fully qualified property name X::$protC does not specify a base class of C --- (Reflecting on X::privC) --- -Fully qualified property name X::privC does not specify a base class of C +Fully qualified property name X::$privC does not specify a base class of C --- (Reflecting on X::doesNotExist) --- -Fully qualified property name X::doesNotExist does not specify a base class of C +Fully qualified property name X::$doesNotExist does not specify a base class of C --- (Reflecting on doesNotexist::doesNotExist) --- -Class doesnotexist does not exist +Class "doesnotexist" does not exist diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt index 2b4cd27a946cf..8a1951062ff29 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt @@ -61,5 +61,5 @@ string(17) "changed protected" string(14) "changed public" Retrieving non-existent values from A with no default value: -Class A does not have a property named protectedDoesNotExist -Class A does not have a property named privateDoesNotExist +Property A::$protectedDoesNotExist does not exist +Property A::$privateDoesNotExist does not exist diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt index e034e082158ea..3e21780231f0e 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_002.phpt @@ -41,6 +41,6 @@ try { --EXPECT-- ReflectionClass::getStaticPropertyValue() expects at most 2 parameters, 3 given ReflectionClass::getStaticPropertyValue() expects at least 1 parameter, 0 given -Class C does not have a property named +Property C::$ does not exist string(3) "def" ReflectionClass::getStaticPropertyValue(): Argument #1 ($name) must be of type string, array given diff --git a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt index d912b568e8a96..38990073a180e 100644 --- a/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt +++ b/ext/reflection/tests/ReflectionClass_implementsInterface_001.phpt @@ -147,5 +147,5 @@ Test bad arguments: ReflectionClass::implementsInterface() expects exactly 1 parameter, 0 given ReflectionClass::implementsInterface() expects exactly 1 parameter, 2 given ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, null given -Interface ThisClassDoesNotExist does not exist +Interface "ThisClassDoesNotExist" does not exist ReflectionClass::implementsInterface(): Argument #1 ($interface) must be of type ReflectionClass|string, int given diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt index 6d4ae500a96af..fd9193e0a4569 100644 --- a/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt +++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_002.phpt @@ -40,5 +40,5 @@ Test bad arguments: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given -Class ThisClassDoesNotExist does not exist +Class "ThisClassDoesNotExist" does not exist ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given diff --git a/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt b/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt index bb4f96818aa51..1d804641f38d7 100644 --- a/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt +++ b/ext/reflection/tests/ReflectionClass_isSubclassOf_error1.phpt @@ -9,7 +9,7 @@ var_dump($rc->isSubclassOf('X')); ?> --EXPECTF-- -Fatal error: Uncaught ReflectionException: Class X does not exist in %s:5 +Fatal error: Uncaught ReflectionException: Class "X" does not exist in %s:%d Stack trace: #0 %s(5): ReflectionClass->isSubclassOf('X') #1 {main} diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt index 391beced52527..b9b2f35388381 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error1.phpt @@ -80,7 +80,7 @@ Stack trace: #0 %s ReflectionMethod->__construct(true, 'foo') #1 {main} Wrong type of argument (string, bool): -ReflectionException: Method TestClass::1() does not exist in %s +ReflectionException: Method TestClass::1() does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestClass', '1') #1 {main} @@ -90,12 +90,12 @@ Stack trace: #0 %s ReflectionMethod->__construct('TestClass') #1 {main} Class and Method in same string, bad method name: -ReflectionException: Method TestClass::foop::dedoop() does not exist in %s +ReflectionException: Method TestClass::foop::dedoop() does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestClass::foop...') #1 {main} Class and Method in same string, bad class name: -ReflectionException: Class TestCla does not exist in %s +ReflectionException: Class "TestCla" does not exist in %s:%d Stack trace: #0 %s ReflectionMethod->__construct('TestCla::foo') #1 {main} diff --git a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt index cf0d3bbbaa130..3f5dcb3f6c8a4 100644 --- a/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt +++ b/ext/reflection/tests/ReflectionMethod_constructor_error2.phpt @@ -56,6 +56,6 @@ Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 0 given Too many arguments: Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 3 given -Ok - Class InvalidClassName does not exist +Ok - Class "InvalidClassName" does not exist Ok - ReflectionMethod::__construct(): Argument #1 ($class_or_method) must be of type object|string, array given Ok - ReflectionMethod::__construct() expects exactly 1 parameter, 2 given diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt index 30f769aa3dfd4..a8a927280e203 100644 --- a/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt +++ b/ext/reflection/tests/ReflectionObject_isSubclassOf.002.phpt @@ -40,5 +40,5 @@ Test bad arguments: ReflectionClass::isSubclassOf() expects exactly 1 parameter, 0 given ReflectionClass::isSubclassOf() expects exactly 1 parameter, 2 given ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, null given -Class ThisClassDoesNotExist does not exist +Class "ThisClassDoesNotExist" does not exist ReflectionClass::isSubclassOf(): Argument #1 ($class) must be of type ReflectionClass|string, int given diff --git a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt index 582bcffe65f13..71079650febc1 100644 --- a/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt +++ b/ext/reflection/tests/ReflectionObject_isSubclassOf_error.phpt @@ -9,7 +9,7 @@ var_dump($ro->isSubclassOf('X')); ?> --EXPECTF-- -Fatal error: Uncaught ReflectionException: Class X does not exist in %s:%d +Fatal error: Uncaught ReflectionException: Class "X" does not exist in %s:%d Stack trace: #0 %s(%d): ReflectionClass->isSubclassOf('X') #1 {main} diff --git a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt index fd83e30aaa3ff..5fa249a9b58a1 100644 --- a/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt +++ b/ext/reflection/tests/ReflectionParameter_invalidMethodInConstructor.phpt @@ -40,7 +40,7 @@ echo "Done.\n"; ?> --EXPECT-- -Class A does not exist +Class "A" does not exist Method C::b() does not exist Method C::b() does not exist Ok - ReflectionParameter::__construct() expects exactly 2 parameters, 1 given diff --git a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt index a2df95430947c..cf5fa003962ad 100644 --- a/ext/reflection/tests/ReflectionProperty_constructor_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_constructor_error.phpt @@ -35,7 +35,7 @@ catch(Exception $e) { ?> --EXPECT-- Non-existent class: -Class NonExistentClass does not exist +Class "NonExistentClass" does not exist Wrong property parameter type: ReflectionProperty::__construct(): Argument #1 ($class) must be of type object|string, int given diff --git a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt index 40254319cc14f..49b3c7bd9a90c 100644 --- a/ext/reflection/tests/ReflectionProperty_getValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_getValue_error.phpt @@ -60,7 +60,7 @@ Static property / too many args: ReflectionProperty::getValue() expects at most 1 parameter, 2 given Protected property: -Cannot access non-public member TestClass::$prot +Cannot access non-public property TestClass::$prot Invalid instance: Given object is not an instance of the class this property was declared in diff --git a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt index ac87873c6ac99..74e25252d1a0e 100644 --- a/ext/reflection/tests/ReflectionProperty_isInitialized.phpt +++ b/ext/reflection/tests/ReflectionProperty_isInitialized.phpt @@ -109,7 +109,7 @@ Dynamic properties: bool(true) bool(false) Visibility handling: -Cannot access non-public member A::$p +Cannot access non-public property A::$p bool(false) Object type: bool(false) diff --git a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt index fd82a47198969..f0d49a56cb25d 100644 --- a/ext/reflection/tests/ReflectionProperty_setAccessible.phpt +++ b/ext/reflection/tests/ReflectionProperty_setAccessible.phpt @@ -116,10 +116,10 @@ var_dump($protectedStatic->getValue()); var_dump($private->getValue($b)); ?> --EXPECT-- -string(45) "Cannot access non-public member A::$protected" -string(51) "Cannot access non-public member A::$protectedStatic" -string(43) "Cannot access non-public member A::$private" -string(49) "Cannot access non-public member A::$privateStatic" +string(47) "Cannot access non-public property A::$protected" +string(53) "Cannot access non-public property A::$protectedStatic" +string(45) "Cannot access non-public property A::$private" +string(51) "Cannot access non-public property A::$privateStatic" string(1) "a" string(1) "b" string(1) "c" @@ -128,9 +128,9 @@ string(1) "e" string(1) "f" string(1) "g" string(1) "h" -string(45) "Cannot access non-public member B::$protected" -string(51) "Cannot access non-public member B::$protectedStatic" -string(43) "Cannot access non-public member A::$private" +string(47) "Cannot access non-public property B::$protected" +string(53) "Cannot access non-public property B::$protectedStatic" +string(45) "Cannot access non-public property A::$private" string(1) "a" string(1) "f" string(1) "c" diff --git a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt index 1f0c2b5f2bf79..4b29be8f73e6c 100644 --- a/ext/reflection/tests/ReflectionProperty_setValue_error.phpt +++ b/ext/reflection/tests/ReflectionProperty_setValue_error.phpt @@ -34,7 +34,7 @@ var_dump($instanceWithNoProperties->pub2); ?> --EXPECT-- Protected property: -Cannot access non-public member TestClass::$prot +Cannot access non-public property TestClass::$prot Instance without property: NULL diff --git a/ext/reflection/tests/ReflectionReference_errors.phpt b/ext/reflection/tests/ReflectionReference_errors.phpt index 0d1d63eb28b43..6d7ca3ae3dc2f 100644 --- a/ext/reflection/tests/ReflectionReference_errors.phpt +++ b/ext/reflection/tests/ReflectionReference_errors.phpt @@ -40,7 +40,7 @@ var_dump(unserialize('O:19:"ReflectionReference":0:{}')); ?> --EXPECTF-- -Call to private ReflectionReference::__construct() from invalid context +Call to private ReflectionReference::__construct() from global scope ReflectionReference::fromArrayElement(): Argument #1 ($array) must be of type array, stdClass given ReflectionReference::fromArrayElement(): Argument #2 ($key) must be of type string|int, float given Array key not found diff --git a/ext/reflection/tests/ReflectionZendExtension_error.phpt b/ext/reflection/tests/ReflectionZendExtension_error.phpt index cd06b9646591c..9941d91e2e566 100644 --- a/ext/reflection/tests/ReflectionZendExtension_error.phpt +++ b/ext/reflection/tests/ReflectionZendExtension_error.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- -Zend Extension zend_opcache does not exist +Zend Extension "zend_opcache" does not exist diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt index eec6f094114cb..42be0e6ede1b1 100644 --- a/ext/reflection/tests/bug37816.phpt +++ b/ext/reflection/tests/bug37816.phpt @@ -23,4 +23,4 @@ catch (Exception $e) ?> --EXPECT-- -Caught: Cannot access non-public member TestClass::$p +Caught: Cannot access non-public property TestClass::$p diff --git a/ext/reflection/tests/bug49719.phpt b/ext/reflection/tests/bug49719.phpt index 37f6ae38afcb2..b39ca3481c55c 100644 --- a/ext/reflection/tests/bug49719.phpt +++ b/ext/reflection/tests/bug49719.phpt @@ -40,5 +40,5 @@ var_dump($prop->getValue(new b2)); bool(false) bool(false) bool(false) -string(25) "Property a does not exist" +string(29) "Property B::$a does not exist" int(2) diff --git a/ext/reflection/tests/bug74673.phpt b/ext/reflection/tests/bug74673.phpt index 321195c16ecfb..a8b9d998ca768 100644 --- a/ext/reflection/tests/bug74673.phpt +++ b/ext/reflection/tests/bug74673.phpt @@ -15,7 +15,7 @@ $class = new ReflectionClass('A'); echo $class; ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined constant 'PHP_SELF' in %s:%d +Fatal error: Uncaught Error: Undefined constant "PHP_SELF" in %s:%d Stack trace: #0 %s(%d): ReflectionClass->__toString() #1 {main} diff --git a/ext/reflection/tests/parameters_002.phpt b/ext/reflection/tests/parameters_002.phpt index e25310a6c790d..f27f4ab6fda86 100644 --- a/ext/reflection/tests/parameters_002.phpt +++ b/ext/reflection/tests/parameters_002.phpt @@ -131,7 +131,7 @@ getName: string(2) "na" isPassedByReference: bool(false) Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d -Class NonExistingClass does not exist +Class "NonExistingClass" does not exist getDeclaringClass: NULL isArray: Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d @@ -225,7 +225,7 @@ getName: string(2) "na" isPassedByReference: bool(false) Deprecated: Method ReflectionParameter::getClass() is deprecated in %s on line %d -Class NonExistingClass does not exist +Class "NonExistingClass" does not exist getDeclaringClass: test isArray: Deprecated: Method ReflectionParameter::isArray() is deprecated in %s on line %d diff --git a/ext/session/tests/bug24592.phpt b/ext/session/tests/bug24592.phpt index 3e651cdeec367..c4e9ee77eb61b 100644 --- a/ext/session/tests/bug24592.phpt +++ b/ext/session/tests/bug24592.phpt @@ -20,9 +20,9 @@ $_SESSION['bar'] = $bar; var_dump($_SESSION); ?> --EXPECTF-- -Notice: Undefined index: foo in %s on line %d +Notice: Undefined array key "foo" in %s on line %d -Notice: Undefined index: bar in %s on line %d +Notice: Undefined array key "bar" in %s on line %d NULL NULL array(0) { diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt index 1cc4faf959b73..ef7ca1fc42780 100644 --- a/ext/soap/tests/bugs/bug54911.phpt +++ b/ext/soap/tests/bugs/bug54911.phpt @@ -13,7 +13,7 @@ Bug #54911 (Access to a undefined member in inherit SoapClient may cause Segment $client->__soapCall('', array()); ?> --EXPECTF-- -Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property: XSoapClient::$crash in %sbug54911.php:4 +Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property XSoapClient::$crash in %sbug54911.php:4 Stack trace: #0 [internal function]: XSoapClient->__doRequest('__soapCall('', Array) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index c7b7edd4fd663..f8039c64af885 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -313,13 +313,13 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object * if (Z_TYPE_P(retval) == IS_UNDEF) { switch (type) { case BP_VAR_R: - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key)); case BP_VAR_UNSET: case BP_VAR_IS: retval = &EG(uninitialized_zval); break; case BP_VAR_RW: - zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key)); case BP_VAR_W: { ZVAL_NULL(retval); } @@ -329,13 +329,13 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object * } else { switch (type) { case BP_VAR_R: - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(offset_key)); case BP_VAR_UNSET: case BP_VAR_IS: retval = &EG(uninitialized_zval); break; case BP_VAR_RW: - zend_error(E_NOTICE,"Undefined index: %s", ZSTR_VAL(offset_key)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", ZSTR_VAL(offset_key)); case BP_VAR_W: { zval value; ZVAL_NULL(&value); @@ -363,13 +363,13 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, spl_array_object * if ((retval = zend_hash_index_find(ht, index)) == NULL) { switch (type) { case BP_VAR_R: - zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, index); + zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index); case BP_VAR_UNSET: case BP_VAR_IS: retval = &EG(uninitialized_zval); break; case BP_VAR_RW: - zend_error(E_NOTICE, "Undefined offset: " ZEND_LONG_FMT, index); + zend_error(E_NOTICE, "Undefined array key " ZEND_LONG_FMT, index); case BP_VAR_W: { zval value; ZVAL_UNDEF(&value); @@ -541,7 +541,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec ht = spl_array_get_hash_table(intern); if (ht == &EG(symbol_table)) { if (zend_delete_global_variable(Z_STR_P(offset))) { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset)); } } else { zval *data = zend_symtable_find(ht, Z_STR_P(offset)); @@ -550,7 +550,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec if (Z_TYPE_P(data) == IS_INDIRECT) { data = Z_INDIRECT_P(data); if (Z_TYPE_P(data) == IS_UNDEF) { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset)); } else { zval_ptr_dtor(data); ZVAL_UNDEF(data); @@ -561,10 +561,10 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec } } } else if (zend_symtable_del(ht, Z_STR_P(offset)) == FAILURE) { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset)); } } else { - zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); + zend_error(E_NOTICE,"Undefined array key \"%s\"", Z_STRVAL_P(offset)); } } break; @@ -585,7 +585,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zend_object *objec num_index: ht = spl_array_get_hash_table(intern); if (zend_hash_index_del(ht, index) == FAILURE) { - zend_error(E_NOTICE,"Undefined offset: " ZEND_LONG_FMT, index); + zend_error(E_NOTICE,"Undefined array key " ZEND_LONG_FMT, index); } break; case IS_REFERENCE: diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index b53c2b8722510..45af9c270b188 100644 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -1925,7 +1925,7 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function zend_function *func_ptr; \ func_ptr = (zend_function *)zend_hash_str_find_ptr(EG(function_table), #func_name, sizeof(#func_name) - 1); \ if (func_ptr == NULL) { \ - zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Internal error, function '%s' not found. Please report", #func_name); \ + zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Internal error, function %s() not found. Please report", #func_name); \ return; \ } \ spl_filesystem_file_call(intern, func_ptr, pass_num_args, return_value, arg2); \ diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index d7dac8ac686fb..ca1a5457e226f 100644 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2484,7 +2484,7 @@ PHP_METHOD(CachingIterator, offsetGet) } if ((value = zend_symtable_find(Z_ARRVAL(intern->u.caching.zcache), key)) == NULL) { - zend_error(E_NOTICE, "Undefined index: %s", ZSTR_VAL(key)); + zend_error(E_NOTICE, "Undefined array key \"%s\"", ZSTR_VAL(key)); return; } diff --git a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt index c1b373cebe25f..228a581809180 100644 --- a/ext/spl/tests/SplFileInfo_setFileClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setFileClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, 'stdClass' given +SplFileInfo::setFileClass(): Argument #1 ($class_name) must be a class name derived from SplFileObject, stdClass given diff --git a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt index f9ef81aeeb4d7..d3f49f1814d70 100644 --- a/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt +++ b/ext/spl/tests/SplFileInfo_setInfoClass_error.phpt @@ -13,4 +13,4 @@ try { ?> --EXPECT-- -SplFileInfo::setInfoClass(): Argument #1 ($class_name) must be a class name derived from SplFileInfo, 'stdClass' given +SplFileInfo::setInfoClass(): Argument #1 ($class_name) must be a class name derived from SplFileInfo, stdClass given diff --git a/ext/spl/tests/arrayObject___construct_basic2.phpt b/ext/spl/tests/arrayObject___construct_basic2.phpt index 2e5970004eb12..33f0a68eb96b7 100644 --- a/ext/spl/tests/arrayObject___construct_basic2.phpt +++ b/ext/spl/tests/arrayObject___construct_basic2.phpt @@ -63,7 +63,7 @@ bool(true) Warning: Undefined property: ArrayObject::$prop in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: @@ -91,7 +91,7 @@ bool(true) Warning: Undefined property: MyArrayObject::$prop in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic3.phpt b/ext/spl/tests/arrayObject___construct_basic3.phpt index 2628c991a729b..3ac7e0a75a92b 100644 --- a/ext/spl/tests/arrayObject___construct_basic3.phpt +++ b/ext/spl/tests/arrayObject___construct_basic3.phpt @@ -63,7 +63,7 @@ bool(true) Warning: Undefined property: ArrayObject::$prop in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: @@ -91,7 +91,7 @@ bool(true) Warning: Undefined property: MyArrayObject::$prop in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic4.phpt b/ext/spl/tests/arrayObject___construct_basic4.phpt index ba0ab08ff6319..89069ec871d03 100644 --- a/ext/spl/tests/arrayObject___construct_basic4.phpt +++ b/ext/spl/tests/arrayObject___construct_basic4.phpt @@ -61,11 +61,11 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 39 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: @@ -91,9 +91,9 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_basic5.phpt b/ext/spl/tests/arrayObject___construct_basic5.phpt index 93fcf256eeb30..a382c7bfc57f9 100644 --- a/ext/spl/tests/arrayObject___construct_basic5.phpt +++ b/ext/spl/tests/arrayObject___construct_basic5.phpt @@ -61,11 +61,11 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 39 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: @@ -91,9 +91,9 @@ bool(true) bool(true) - Unset: -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d -Notice: Undefined index: prop in %s on line 40 +Notice: Undefined array key "prop" in %s on line %d NULL NULL - After: diff --git a/ext/spl/tests/arrayObject___construct_error1.phpt b/ext/spl/tests/arrayObject___construct_error1.phpt index 3ac214260ac9e..beac9a76aba3f 100644 --- a/ext/spl/tests/arrayObject___construct_error1.phpt +++ b/ext/spl/tests/arrayObject___construct_error1.phpt @@ -20,6 +20,6 @@ try { ?> --EXPECT-- Bad iterator type: -ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'Exception' given(6) +ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, Exception given(6) Non-existent class: -ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClassName' given(13) +ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, nonExistentClassName given(13) diff --git a/ext/spl/tests/arrayObject_magicMethods1.phpt b/ext/spl/tests/arrayObject_magicMethods1.phpt index dbe75bff2420d..a9acf72ff76de 100644 --- a/ext/spl/tests/arrayObject_magicMethods1.phpt +++ b/ext/spl/tests/arrayObject_magicMethods1.phpt @@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 42 +Notice: Undefined array key "nonexistent" in %s on line %d NULL string(11) "new.changed" Original wrapped object: @@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 60 +Notice: Undefined array key "nonexistent" in %s on line %d Original wrapped object: object(UsesMagic)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods3.phpt b/ext/spl/tests/arrayObject_magicMethods3.phpt index f8b2c2e41c518..adca465525027 100644 --- a/ext/spl/tests/arrayObject_magicMethods3.phpt +++ b/ext/spl/tests/arrayObject_magicMethods3.phpt @@ -102,7 +102,7 @@ object(ArrayObject)#2 (1) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 42 +Notice: Undefined array key "nonexistent" in %s on line %d NULL string(11) "new.changed" Original wrapped object: @@ -171,7 +171,7 @@ object(ArrayObject)#2 (1) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 60 +Notice: Undefined array key "nonexistent" in %s on line %d Original wrapped object: object(UsesMagic)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods4.phpt b/ext/spl/tests/arrayObject_magicMethods4.phpt index e038a1e09c2b6..5227e729af546 100644 --- a/ext/spl/tests/arrayObject_magicMethods4.phpt +++ b/ext/spl/tests/arrayObject_magicMethods4.phpt @@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 45 +Notice: Undefined array key "nonexistent" in %s on line %d NULL string(11) "new.changed" Original wrapped object: @@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 63 +Notice: Undefined array key "nonexistent" in %s on line %d Original wrapped object: object(C)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_magicMethods6.phpt b/ext/spl/tests/arrayObject_magicMethods6.phpt index e0ccb43dd4846..d7bf712441f09 100644 --- a/ext/spl/tests/arrayObject_magicMethods6.phpt +++ b/ext/spl/tests/arrayObject_magicMethods6.phpt @@ -107,7 +107,7 @@ object(UsesMagic)#2 (2) { --> Read existent, non-existent and dynamic: string(7) "changed" -Notice: Undefined index: nonexistent in %s on line 45 +Notice: Undefined array key "nonexistent" in %s on line %d NULL string(11) "new.changed" Original wrapped object: @@ -180,7 +180,7 @@ object(UsesMagic)#2 (2) { --> Unset existent, non-existent and dynamic: -Notice: Undefined index: nonexistent in %s on line 63 +Notice: Undefined array key "nonexistent" in %s on line %d Original wrapped object: object(C)#1 (3) { ["b"]=> diff --git a/ext/spl/tests/arrayObject_setFlags_basic1.phpt b/ext/spl/tests/arrayObject_setFlags_basic1.phpt index 173836cebcfb1..3155390834e8b 100644 --- a/ext/spl/tests/arrayObject_setFlags_basic1.phpt +++ b/ext/spl/tests/arrayObject_setFlags_basic1.phpt @@ -44,8 +44,8 @@ string(21) "array element.changed" --> Remove the array element and try access again: bool(false) -Notice: Undefined index: p in %s on line 10 +Notice: Undefined array key "p" in %s on line %d NULL -Notice: Undefined index: p in %s on line 12 +Notice: Undefined array key "p" in %s on line %d string(8) ".changed" diff --git a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt index 918dcbee960ca..d178c06701a8b 100644 --- a/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt +++ b/ext/spl/tests/arrayObject_setIteratorClass_error1.phpt @@ -43,7 +43,7 @@ try { ?> --EXPECT-- -string(130) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'nonExistentClass' given" -string(122) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, 'stdClass' given" -string(126) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'nonExistentClass' given" -string(118) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, 'stdClass' given" +string(128) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, nonExistentClass given" +string(120) "ArrayObject::setIteratorClass(): Argument #1 ($iteratorClass) must be a class name derived from Iterator, stdClass given" +string(124) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, nonExistentClass given" +string(116) "ArrayObject::__construct(): Argument #3 ($iterator_class) must be a class name derived from Iterator, stdClass given" diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt index 14543f472fdf3..defb313f13c60 100644 --- a/ext/spl/tests/array_001.phpt +++ b/ext/spl/tests/array_001.phpt @@ -77,15 +77,15 @@ object(ArrayObject)#%d (1) { } int(0) -Notice: Undefined offset: 6 in %sarray_001.php on line %d +Notice: Undefined array key 6 in %s on line %d NULL -Notice: Undefined index: b in %sarray_001.php on line %d +Notice: Undefined array key "b" in %s on line %d NULL -Notice: Undefined offset: 7 in %sarray_001.php on line %d +Notice: Undefined array key 7 in %s on line %d -Notice: Undefined index: c in %sarray_001.php on line %d +Notice: Undefined array key "c" in %s on line %d object(ArrayObject)#%d (1) { ["storage":"ArrayObject":private]=> array(2) { diff --git a/ext/spl/tests/array_010.phpt b/ext/spl/tests/array_010.phpt index 1df3be5acb1d1..27ba612a2181a 100644 --- a/ext/spl/tests/array_010.phpt +++ b/ext/spl/tests/array_010.phpt @@ -92,10 +92,10 @@ int(1) string(3) "3rd" int(4) -Notice: Undefined index: 5th in %sarray_010.php on line %d +Notice: Undefined array key "5th" in %sarray_010.php on line %d NULL -Notice: Undefined offset: 6 in %sarray_010.php on line %d +Notice: Undefined array key 6 in %sarray_010.php on line %d NULL ===offsetSet=== WRITE 1 @@ -126,9 +126,9 @@ array(6) { string(9) "changed 6" } -Notice: Undefined offset: 7 in %sarray_010.php on line %d +Notice: Undefined array key 7 in %sarray_010.php on line %d -Notice: Undefined index: 8th in %sarray_010.php on line %d +Notice: Undefined array key "8th" in %sarray_010.php on line %d array(4) { [0]=> string(3) "1st" diff --git a/ext/spl/tests/bug38325.phpt b/ext/spl/tests/bug38325.phpt index 1911fc8eafbc5..5fa521a96c6c0 100644 --- a/ext/spl/tests/bug38325.phpt +++ b/ext/spl/tests/bug38325.phpt @@ -6,7 +6,7 @@ spl_autoload_register(); new ThisClassDoesNotExistEverFoo(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'ThisClassDoesNotExistEverFoo' not found in %s:%d +Fatal error: Uncaught Error: Class "ThisClassDoesNotExistEverFoo" not found in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/ext/spl/tests/bug45622.phpt b/ext/spl/tests/bug45622.phpt index ad84dda1d2e27..4e1f5863157c6 100644 --- a/ext/spl/tests/bug45622.phpt +++ b/ext/spl/tests/bug45622.phpt @@ -41,7 +41,7 @@ string(13) "array element" --> Remove the array element and try access again: bool(false) -Notice: Undefined index: p in %s on line %d +Notice: Undefined array key "p" in %s on line %d NULL --> Re-add the real property: diff --git a/ext/spl/tests/bug45622b.phpt b/ext/spl/tests/bug45622b.phpt index c829b185dd6c1..caaee5ea8e30a 100644 --- a/ext/spl/tests/bug45622b.phpt +++ b/ext/spl/tests/bug45622b.phpt @@ -25,9 +25,9 @@ isset($ao->prop4); --EXPECTF-- Doesn't trigger __get. -Notice: Undefined index: prop1 in %s on line 11 +Notice: Undefined array key "prop1" in %s on line %d Doesn't trigger __set. Doesn't trigger __unset. -Notice: Undefined index: prop3 in %s on line 17 +Notice: Undefined array key "prop3" in %s on line %d Shouldn't trigger __isset. diff --git a/ext/spl/tests/bug48023.phpt b/ext/spl/tests/bug48023.phpt index 9cb8dd2c1fe06..e42e2f4f03cde 100644 --- a/ext/spl/tests/bug48023.phpt +++ b/ext/spl/tests/bug48023.phpt @@ -9,7 +9,7 @@ new Foo; ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught Error: Class 'Foo' not found in %s:%d +Fatal error: Uncaught Error: Class "Foo" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/spl/tests/bug54323.phpt b/ext/spl/tests/bug54323.phpt index a2e252239346c..ce755f10c019e 100644 --- a/ext/spl/tests/bug54323.phpt +++ b/ext/spl/tests/bug54323.phpt @@ -19,6 +19,6 @@ function testAccess($c, $ao) { --EXPECTF-- Warning: Undefined property: C::$prop in %s on line %d -Notice: Undefined index: prop in %sbug54323.php on line 14 +Notice: Undefined array key "prop" in %sbug54323.php on line 14 NULL NULL diff --git a/ext/spl/tests/bug62978.phpt b/ext/spl/tests/bug62978.phpt index 01ce807031853..6da5b85a17a33 100644 --- a/ext/spl/tests/bug62978.phpt +++ b/ext/spl/tests/bug62978.phpt @@ -25,10 +25,10 @@ var_dump($a[$fp]); fclose($fp); --EXPECTF-- -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined array key "epic_magic" in %s on line %d NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined array key "epic_magic" in %s on line %d NULL Warning: Undefined variable $c in %s on line %d @@ -36,17 +36,17 @@ 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 NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined array key "epic_magic" in %s on line %d NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined array key "epic_magic" in %s on line %d NULL -Notice: Undefined index: epic_magic in %sbug62978.php on line %d +Notice: Undefined array key "epic_magic" in %s on line %d NULL bool(false) Warning: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d -Notice: Undefined offset: %d in %sbug62978.php on line %d +Notice: Undefined array key %d in %sbug62978.php on line %d NULL diff --git a/ext/spl/tests/bug66834.phpt b/ext/spl/tests/bug66834.phpt index 0ff909f42285d..72d5ef52a2c3f 100644 --- a/ext/spl/tests/bug66834.phpt +++ b/ext/spl/tests/bug66834.phpt @@ -150,7 +150,7 @@ bool(false) bool(true) ==== class with offsetGet() and offsetSet() ==== -Notice: Undefined index: foo in %s on line %d +Notice: Undefined array key "foo" in %s on line %d bool(false) bool(true) bool(false) diff --git a/ext/spl/tests/bug70852.phpt b/ext/spl/tests/bug70852.phpt index 463f9d1b438cf..5869e624d0160 100644 --- a/ext/spl/tests/bug70852.phpt +++ b/ext/spl/tests/bug70852.phpt @@ -8,8 +8,8 @@ var_dump($y[NULL]); var_dump($y[NULL]++); ?> --EXPECTF-- -Notice: Undefined index: in %s on line %d +Notice: Undefined array key "" in %s on line %d NULL -Notice: Undefined index: in %s on line %d +Notice: Undefined array key "" in %s on line %d NULL diff --git a/ext/spl/tests/bug71204.phpt b/ext/spl/tests/bug71204.phpt index a984690fcbc47..8d1c721c100b7 100644 --- a/ext/spl/tests/bug71204.phpt +++ b/ext/spl/tests/bug71204.phpt @@ -13,7 +13,7 @@ spl_autoload_register(function ($name) { new A(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'A' not found in %sbug71204.php:%d +Fatal error: Uncaught Error: Class "A" not found in %s:%d Stack trace: #0 {main} thrown in %sbug71204.php on line %d diff --git a/ext/spl/tests/bug73423.phpt b/ext/spl/tests/bug73423.phpt index 451748e52b88d..e1fc312651a42 100644 --- a/ext/spl/tests/bug73423.phpt +++ b/ext/spl/tests/bug73423.phpt @@ -68,13 +68,13 @@ foreach (new \RecursiveIteratorIterator (new fooIterator ($foo)) as $bar) ; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'NotExists' not found in %s:%d +Fatal error: Uncaught Error: Class "NotExists" not found in %s:%d Stack trace: #0 %s(%d): eval() #1 %s(%d): fooIterator->__destruct() #2 {main} -Next Error: Class 'NotExists' not found in %s:%d +Next Error: Class "NotExists" not found in %s:%d Stack trace: #0 %s(%d): eval() #1 %s(%d): fooIterator->__destruct() diff --git a/ext/spl/tests/bug73896.phpt b/ext/spl/tests/bug73896.phpt index 18e54644a9961..657f30c50dbec 100644 --- a/ext/spl/tests/bug73896.phpt +++ b/ext/spl/tests/bug73896.phpt @@ -35,4 +35,4 @@ try { } ?> --EXPECT-- -Exception: Class 'teException' not found +Exception: Class "teException" not found diff --git a/ext/spl/tests/bug74669.phpt b/ext/spl/tests/bug74669.phpt index 6b4ceec65cda0..05fa4e415baac 100644 --- a/ext/spl/tests/bug74669.phpt +++ b/ext/spl/tests/bug74669.phpt @@ -98,7 +98,7 @@ var_dump($selfArray['foo']); 0 => test1 1 => test2 -Notice: Undefined index: foo in %s on line %d +Notice: Undefined array key "foo" in %s on line %d NULL object(SelfArray)#9 (1) { ["foo"]=> diff --git a/ext/spl/tests/iterator_044.phpt b/ext/spl/tests/iterator_044.phpt index 38dfde3f03d6f..babce8a43ed28 100644 --- a/ext/spl/tests/iterator_044.phpt +++ b/ext/spl/tests/iterator_044.phpt @@ -78,7 +78,7 @@ Exception: MyCachingIterator does not use a full cache (see CachingIterator::__c int(0) bool(false) -Notice: Undefined index: 0 in %siterator_044.php on line %d +Notice: Undefined array key "0" in %s on line %d NULL ===1=== object(stdClass)#%d (0) { @@ -90,31 +90,31 @@ object(MyFoo)#%d (0) { } bool(false) -Notice: Undefined index: foo in %siterator_044.php on line %d +Notice: Undefined array key "foo" in %s on line %d NULL ===3=== NULL bool(false) -Notice: Undefined index: in %siterator_044.php on line %d +Notice: Undefined array key "" in %s on line %d NULL ===4=== int(2) bool(false) -Notice: Undefined index: 2 in %siterator_044.php on line %d +Notice: Undefined array key "2" in %s on line %d NULL ===5=== string(3) "foo" bool(false) -Notice: Undefined index: foo in %siterator_044.php on line %d +Notice: Undefined array key "foo" in %s on line %d NULL ===6=== int(3) bool(false) -Notice: Undefined index: 3 in %siterator_044.php on line %d +Notice: Undefined array key "3" in %s on line %d NULL ===FILL=== ===0=== @@ -135,7 +135,7 @@ int(1) NULL bool(false) -Notice: Undefined index: in %siterator_044.php on line %d +Notice: Undefined array key "" in %s on line %d NULL ===4=== int(2) @@ -149,5 +149,5 @@ int(1) int(3) bool(false) -Notice: Undefined index: 3 in %siterator_044.php on line %d +Notice: Undefined array key "3" in %s on line %d NULL diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index d180d044c0d85..c31d0b6157dc4 100644 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -85,5 +85,5 @@ int(6) int(4) ===ERRORS=== iterator_apply(): Argument #3 ($args) must be of type ?array, int given -iterator_apply(): Argument #2 ($function) must be a valid callback, function 'non_existing_function' not found or invalid function name +iterator_apply(): Argument #2 ($function) must be a valid callback, function "non_existing_function" not found or invalid function name iterator_apply() expects at most 3 parameters, 4 given diff --git a/ext/spl/tests/spl_autoload_001.phpt b/ext/spl/tests/spl_autoload_001.phpt index 50c815c4adf49..90e863ce69702 100644 --- a/ext/spl/tests/spl_autoload_001.phpt +++ b/ext/spl/tests/spl_autoload_001.phpt @@ -100,4 +100,4 @@ TestFunc2(TestClass) %stestclass.class.inc bool(true) ===NOFUNCTION=== -spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, function 'unavailable_autoload_function' not found or invalid function name +spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, function "unavailable_autoload_function" not found or invalid function name diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt index 375ba2ef5ecec..a460d259fb2a4 100644 --- a/ext/spl/tests/spl_autoload_007.phpt +++ b/ext/spl/tests/spl_autoload_007.phpt @@ -52,7 +52,7 @@ foreach($funcs as $idx => $func) ?> --EXPECTF-- string(22) "MyAutoLoader::notExist" -spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist' +spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist" string(22) "MyAutoLoader::noAccess" spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, cannot access protected method MyAutoLoader::noAccess() @@ -69,7 +69,7 @@ array(2) { [1]=> string(8) "notExist" } -spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist' +spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist" array(2) { [0]=> @@ -102,7 +102,7 @@ array(2) { [1]=> string(8) "notExist" } -spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class 'MyAutoLoader' does not have a method 'notExist' +spl_autoload_register(): Argument #1 ($autoload_function) must be a valid callback, class MyAutoLoader does not have a method "notExist" array(2) { [0]=> diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ee82fa32e004f..6ca3cc7d6dd2e 100755 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2427,7 +2427,7 @@ PHP_FUNCTION(register_tick_function) if (!zend_is_callable(&tick_fe.arguments[0], 0, &function_name)) { efree(tick_fe.arguments); - zend_argument_type_error(1, "must be a valid tick callback, '%s' given", ZSTR_VAL(function_name)); + zend_argument_type_error(1, "must be a valid tick callback, \"%s\" given", ZSTR_VAL(function_name)); zend_string_release_ex(function_name, 0); RETURN_THROWS(); } else if (function_name) { diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index d6a79e3699a46..9c65586f63ab5 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -707,7 +707,7 @@ php_formatted_print(char *format, size_t format_len, zval *args, int argc, int n /* break missing intentionally */ default: - zend_value_error("Unknown format specifier '%c'", *format); + zend_value_error("Unknown format specifier \"%c\"", *format); goto fail; } format++; diff --git a/ext/standard/string.c b/ext/standard/string.c index 5650164bf6fde..8943a37bed550 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2364,7 +2364,7 @@ PHP_FUNCTION(substr_replace) from_idx = len_idx = repl_idx = 0; - ZEND_HASH_FOREACH_KEY_VAL(str_ht, num_index, str_index, tmp_str) { + ZEND_HASH_FOREACH_KEY_VAL_IND(str_ht, num_index, str_index, tmp_str) { zend_string *tmp_orig_str; zend_string *orig_str = zval_get_tmp_string(tmp_str, &tmp_orig_str); @@ -2804,7 +2804,7 @@ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *p zend_string *key_used; /* we have to rebuild HashTable with numeric keys */ zend_hash_init(&str_hash, zend_hash_num_elements(pats), NULL, NULL, 0); - ZEND_HASH_FOREACH_KEY_VAL(pats, num_key, str_key, entry) { + ZEND_HASH_FOREACH_KEY_VAL_IND(pats, num_key, str_key, entry) { if (UNEXPECTED(!str_key)) { key_used = zend_long_to_str(num_key); len = ZSTR_LEN(key_used); @@ -3238,7 +3238,7 @@ PHP_FUNCTION(strtr) zend_string *str_key, *tmp_str, *replace, *tmp_replace; zval *entry; - ZEND_HASH_FOREACH_KEY_VAL(from_ht, num_key, str_key, entry) { + ZEND_HASH_FOREACH_KEY_VAL_IND(from_ht, num_key, str_key, entry) { tmp_str = NULL; if (UNEXPECTED(!str_key)) { str_key = tmp_str = zend_long_to_str(num_key); @@ -4119,7 +4119,7 @@ static zend_long php_str_replace_in_subject(zval *search, zval *replace, zend_st } /* For each entry in the search array, get the entry */ - ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(search), search_entry) { + ZEND_HASH_FOREACH_VAL_IND(Z_ARRVAL_P(search), search_entry) { /* Make sure we're dealing with strings. */ zend_string *tmp_search_str; zend_string *search_str = zval_get_tmp_string(search_entry, &tmp_search_str); @@ -4282,7 +4282,7 @@ static void php_str_replace_common(INTERNAL_FUNCTION_PARAMETERS, int case_sensit /* For each subject entry, convert it to string, then perform replacement and add the result to the return_value array. */ - ZEND_HASH_FOREACH_KEY_VAL(subject_ht, num_key, string_key, subject_entry) { + ZEND_HASH_FOREACH_KEY_VAL_IND(subject_ht, num_key, string_key, subject_entry) { zend_string *tmp_subject_str; ZVAL_DEREF(subject_entry); subject_str = zval_get_tmp_string(subject_entry, &tmp_subject_str); diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt index bd5823e698eea..b8dfb73873bbe 100644 --- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt +++ b/ext/standard/tests/array/array_diff_ukey_variation10.phpt @@ -25,5 +25,5 @@ try { ?> --EXPECT-- *** Testing array_diff_ukey() : usage variation *** -array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name -array_diff_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name +array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name +array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt index e5118a01e0e10..f5158e337ccc9 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -64,6 +64,6 @@ array(7) { [6]=> NULL } -array_filter(): Argument #2 ($callback) must be a valid callback, function 'echo' not found or invalid function name -array_filter(): Argument #2 ($callback) must be a valid callback, function 'exit' not found or invalid function name +array_filter(): Argument #2 ($callback) must be a valid callback, function "echo" not found or invalid function name +array_filter(): Argument #2 ($callback) must be a valid callback, function "exit" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt index 734564e0e3e56..71126a1eddfa8 100644 --- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt +++ b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt @@ -25,5 +25,5 @@ try { ?> --EXPECT-- *** Testing array_intersect_ukey() : usage variation *** -array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name -array_intersect_ukey(): Argument #3 must be a valid callback, function 'unknown_function' not found or invalid function name +array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name +array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt index 4e97270b64598..53524fc8196a5 100644 --- a/ext/standard/tests/array/array_map_object2.phpt +++ b/ext/standard/tests/array/array_map_object2.phpt @@ -39,7 +39,7 @@ echo "Done"; --EXPECT-- *** Testing array_map() : with non-existent class and method *** -- with non-existent class -- -array_map(): Argument #1 ($callback) must be a valid callback, class 'non-existent' not found +array_map(): Argument #1 ($callback) must be a valid callback, class "non-existent" not found -- with existent class and non-existent method -- -array_map(): Argument #1 ($callback) must be a valid callback, class 'SimpleClass' does not have a method 'non-existent' +array_map(): Argument #1 ($callback) must be a valid callback, class SimpleClass does not have a method "non-existent" Done diff --git a/ext/standard/tests/array/array_map_object3.phpt b/ext/standard/tests/array/array_map_object3.phpt index 11b56a6723e52..b5528c9e7c166 100644 --- a/ext/standard/tests/array/array_map_object3.phpt +++ b/ext/standard/tests/array/array_map_object3.phpt @@ -76,7 +76,7 @@ array(3) { int(7) } -- accessing child method from parent class -- -array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map(): Argument #1 ($callback) must be a valid callback, class ParentClass does not have a method "staticChild" -- accessing parent method using child class object -- array(3) { [0]=> @@ -87,5 +87,5 @@ array(3) { int(7) } -- accessing child method using parent class object -- -array_map(): Argument #1 ($callback) must be a valid callback, class 'ParentClass' does not have a method 'staticChild' +array_map(): Argument #1 ($callback) must be a valid callback, class ParentClass does not have a method "staticChild" Done diff --git a/ext/standard/tests/array/array_map_variation12.phpt b/ext/standard/tests/array/array_map_variation12.phpt index 69eaf2e3d7e85..1c4f3b23a1af8 100644 --- a/ext/standard/tests/array/array_map_variation12.phpt +++ b/ext/standard/tests/array/array_map_variation12.phpt @@ -44,5 +44,5 @@ array(3) { -- with built-in function 'pow' and one parameter -- pow() expects exactly 2 parameters, 1 given -- with language construct -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "echo" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation14.phpt b/ext/standard/tests/array/array_map_variation14.phpt index e51fb0b381c2d..2670537b4674c 100644 --- a/ext/standard/tests/array/array_map_variation14.phpt +++ b/ext/standard/tests/array/array_map_variation14.phpt @@ -118,7 +118,7 @@ array(2) { int(2) } -- with empty string -- -array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name -- with empty array -- array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members Done diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt index d8f5747ab48e8..f10be3cc328a9 100644 --- a/ext/standard/tests/array/array_map_variation15.phpt +++ b/ext/standard/tests/array/array_map_variation15.phpt @@ -23,5 +23,5 @@ echo "Done"; ?> --EXPECT-- *** Testing array_map() : non existent 'callback' function *** -array_map(): Argument #1 ($callback) must be a valid callback, function 'non_existent' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "non_existent" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation16.phpt b/ext/standard/tests/array/array_map_variation16.phpt index 4d13691ade10b..21034375b9c6e 100644 --- a/ext/standard/tests/array/array_map_variation16.phpt +++ b/ext/standard/tests/array/array_map_variation16.phpt @@ -38,19 +38,19 @@ echo "Done"; --EXPECT-- *** Testing array_map() : non-permmited built-in functions *** -- Iteration 1 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'echo' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "echo" not found or invalid function name -- Iteration 2 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'array' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "array" not found or invalid function name -- Iteration 3 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'empty' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "empty" not found or invalid function name -- Iteration 4 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'eval' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "eval" not found or invalid function name -- Iteration 5 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'exit' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "exit" not found or invalid function name -- Iteration 6 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'isset' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "isset" not found or invalid function name -- Iteration 7 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'list' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "list" not found or invalid function name -- Iteration 8 -- -array_map(): Argument #1 ($callback) must be a valid callback, function 'print' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "print" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt index 3a547d67effdc..a3aeb9f22a1e3 100644 --- a/ext/standard/tests/array/array_map_variation17.phpt +++ b/ext/standard/tests/array/array_map_variation17.phpt @@ -115,10 +115,10 @@ array_map(): Argument #1 ($callback) must be a valid callback, no array or strin array_map(): Argument #1 ($callback) must be a valid callback, no array or string given -- Iteration 14 -- -array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name -- Iteration 15 -- -array_map(): Argument #1 ($callback) must be a valid callback, function '' not found or invalid function name +array_map(): Argument #1 ($callback) must be a valid callback, function "" not found or invalid function name -- Iteration 16 -- array_map(): Argument #1 ($callback) must be a valid callback, array must have exactly two members diff --git a/ext/standard/tests/array/array_walk_recursive_variation8.phpt b/ext/standard/tests/array/array_walk_recursive_variation8.phpt index f26cf1b1fd7cf..8002957e7e4f6 100644 --- a/ext/standard/tests/array/array_walk_recursive_variation8.phpt +++ b/ext/standard/tests/array/array_walk_recursive_variation8.phpt @@ -35,5 +35,5 @@ bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk_recursive(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name +array_walk_recursive(): Argument #2 ($funcname) must be a valid callback, function "echo" not found or invalid function name Done diff --git a/ext/standard/tests/array/array_walk_variation8.phpt b/ext/standard/tests/array/array_walk_variation8.phpt index d855429c28c29..2186bb64023b1 100644 --- a/ext/standard/tests/array/array_walk_variation8.phpt +++ b/ext/standard/tests/array/array_walk_variation8.phpt @@ -35,5 +35,5 @@ bool(true) -- With 'min' built-in function -- bool(true) -- With 'echo' language construct -- -array_walk(): Argument #2 ($funcname) must be a valid callback, function 'echo' not found or invalid function name +array_walk(): Argument #2 ($funcname) must be a valid callback, function "echo" not found or invalid function name Done diff --git a/ext/standard/tests/bug79821.phpt b/ext/standard/tests/bug79821.phpt new file mode 100644 index 0000000000000..53c28ccf0fc49 --- /dev/null +++ b/ext/standard/tests/bug79821.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #79821 (array grow during var_dump) +--FILE-- + +--EXPECT-- +OK diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt index e2fa6cce59e84..8fe6946d72c2f 100644 --- a/ext/standard/tests/file/001.phpt +++ b/ext/standard/tests/file/001.phpt @@ -3,7 +3,7 @@ File type functions --SKIPIF-- diff --git a/ext/standard/tests/file/bug39367.phpt b/ext/standard/tests/file/bug39367.phpt index f3e79fcf5ed99..3535250329c8c 100644 --- a/ext/standard/tests/file/bug39367.phpt +++ b/ext/standard/tests/file/bug39367.phpt @@ -3,7 +3,7 @@ Bug #39367 (clearstatcache() doesn't clear realpath cache) --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt index 35eb8e80e13e4..c13eeb0ccf7c2 100644 --- a/ext/standard/tests/file/fflush_variation2.phpt +++ b/ext/standard/tests/file/fflush_variation2.phpt @@ -3,7 +3,7 @@ Test fflush() function: usage variations - links as resource --SKIPIF-- --FILE-- --FILE-- --FILE-- diff --git a/ext/standard/tests/file/filetype_variation.phpt b/ext/standard/tests/file/filetype_variation.phpt index 0f93429548f2d..43945078681c8 100644 --- a/ext/standard/tests/file/filetype_variation.phpt +++ b/ext/standard/tests/file/filetype_variation.phpt @@ -2,9 +2,6 @@ Test filetype() function: Variations --SKIPIF-- diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index e4a2029c55f6a..a754f6431fdf4 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -7,7 +7,7 @@ Dave Kelsey if(substr(PHP_OS, 0, 3) != "WIN") die("skip Run only on Windows"); -if (!is_writable('c:\\fopen_variation10.tmp')) { +if (!is_writable('c:\\')) { die('skip. C:\\ not writable.'); } @@ -64,9 +64,9 @@ foreach($paths as $path) { } else { fpassthru($h); + fclose($h); echo "\n"; } - fclose($h); }; unlink($firstfile); @@ -91,22 +91,16 @@ file in root Warning: fopen(c\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d - --\-- -Warning: fopen(\\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d +Warning: fopen(\\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d - --/-- -Warning: fopen(/\fopen_variation10.tmp): Failed to open stream: Invalid argument in %s on line %d +Warning: fopen(/\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d - --c:fopen10.tmpdirTwo-- file in fopen10.tmpdirTwo @@ -115,8 +109,6 @@ file in fopen10.tmpdirTwo Warning: fopen(c:adir\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read -Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d - --c:\/-- file in root @@ -136,5 +128,3 @@ file in fopen10.tmpDir Warning: fopen(/sortout\fopen_variation10.tmp): Failed to open stream: No such file or directory in %s on line %d file not opened for read - -Warning: fclose(): Argument #1 must be of type resource, bool given in %s on line %d diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index a200d65a44a4e..e6201829b005a 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -6,7 +6,7 @@ Dave Kelsey --FILE-- diff --git a/ext/standard/tests/file/mkdir-002.phpt b/ext/standard/tests/file/mkdir-002.phpt index 2cc849f4622f5..2953af88874ef 100644 --- a/ext/standard/tests/file/mkdir-002.phpt +++ b/ext/standard/tests/file/mkdir-002.phpt @@ -3,7 +3,7 @@ mkdir(dir, 0777) tests --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/realpath_basic4.phpt b/ext/standard/tests/file/realpath_basic4.phpt index 1af510d34a02b..47fd8040c7fc7 100644 --- a/ext/standard/tests/file/realpath_basic4.phpt +++ b/ext/standard/tests/file/realpath_basic4.phpt @@ -3,7 +3,7 @@ Test realpath() with relative paths --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/symlink.phpt b/ext/standard/tests/file/symlink.phpt index 3afbfe6411474..f549cf6f07382 100644 --- a/ext/standard/tests/file/symlink.phpt +++ b/ext/standard/tests/file/symlink.phpt @@ -3,7 +3,7 @@ symlink() & friends --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt index 630310ec0224f..d33f7d321dc21 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions: basic functionality - link to files --SKIPIF-- --FILE-- @@ -45,7 +46,8 @@ foreach($files as $file) { // create soft link var_dump( symlink($file, $sym_linkname) ); // checking information of link with linkinfo() - var_dump( linkinfo($sym_linkname) ); + $linkinfo = linkinfo($sym_linkname); + var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // checking if given file is soft link var_dump( is_link($sym_linkname) ); // clear the cache @@ -56,7 +58,8 @@ foreach($files as $file) { // creating hard link var_dump( link($file, $linkname) ); // checking information of link with linkinfo() - var_dump( linkinfo($linkname) ); + $linkinfo = linkinfo($sym_linkname); + var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // checking if given link is soft link; expected: false var_dump( is_link($linkname) ); // clear the cache @@ -82,20 +85,20 @@ rmdir($dirname); -- Iteration 1 -- -- Testing on soft links -- bool(true) -int(%d) +bool(true) bool(true) -- Testing on hard links -- bool(true) -int(%d) +bool(true) bool(false) -- Iteration 2 -- -- Testing on soft links -- bool(true) -int(%d) +bool(true) bool(true) -- Testing on hard links -- bool(true) -int(%d) +bool(true) bool(false) Done diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt index fce709d23d8bc..c53831075da37 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions: basic functionality - link to dirs --SKIPIF-- --FILE-- @@ -31,7 +32,8 @@ echo "\n-- Testing on soft links --\n"; // creating soft link to $dirname var_dump( symlink("$file_path/$dirname", $sym_linkname) ); // this works, expected true // gets information about soft link created to directory; expected: true -var_dump( linkinfo($sym_linkname) ); +$linkinfo = linkinfo($sym_linkname); +var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // checks if link created is soft link; expected: true var_dump( is_link($sym_linkname) ); // clear the cache @@ -47,7 +49,11 @@ var_dump( is_link($linkname) ); // link doesn't exists as not created, expected clearstatcache(); // deleting the links -unlink($sym_linkname); +if (PHP_OS_FAMILY === 'Windows') { + rmdir($sym_linkname); +} else { + unlink($sym_linkname); +} echo "Done\n"; ?> @@ -63,7 +69,7 @@ rmdir($dirname); -- Testing on soft links -- bool(true) -int(%d) +bool(true) bool(true) -- Testing on hard links -- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt index 52c37b768c1ce..72737d1a8e6f5 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt @@ -2,9 +2,6 @@ Test symlink(), linkinfo(), link() and is_link() functions : error conditions - symlink & linkinfo --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt index c31efdab16ca3..6cbd374113946 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions : usage variations - link name stored in an array/object --SKIPIF-- --FILE-- @@ -34,7 +35,8 @@ echo "\n-- Working with soft links --\n"; // creating soft link var_dump( symlink($filename, $obj->linkname) ); // check if the link exists -var_dump( linkinfo($obj->linkname) ); +$linkinfo = linkinfo($obj->linkname); +var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // check if link is soft link var_dump( is_link($obj->linkname) ); // delete the link created @@ -47,7 +49,8 @@ echo "\n-- Working with hard links --\n"; // creating hard link var_dump( link($filename, $obj->linkname) ); // check if the link exists -var_dump( linkinfo($obj->linkname) ); +$linkinfo = linkinfo($obj->linkname); +var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // check if link is soft link; expected: false as the link is a hardlink var_dump( is_link($obj->linkname) ); // delete the link created @@ -64,7 +67,8 @@ echo "\n-- Working with soft links --\n"; // creating soft link var_dump( symlink($filename, $link_arr[0]) ); // check if the link exist -var_dump( linkinfo($link_arr[0]) ); +$linkinfo = linkinfo($link_arr[0]); +var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // check if link is soft link var_dump( is_link($link_arr[0]) ); // delete the link created @@ -77,7 +81,8 @@ echo "\n-- Working with hard links --\n"; // creating hard link var_dump( link($filename, $link_arr[0]) ); // check if the link exist -var_dump( linkinfo($link_arr[0]) ); +$linkinfo = linkinfo($link_arr[0]); +var_dump( is_int($linkinfo) && $linkinfo !== -1 ); // check if link is soft link; expected: false as this is a hardlink var_dump( is_link($link_arr[0]) ); // delete the links created @@ -101,23 +106,23 @@ rmdir($dirname); -- Working with soft links -- bool(true) -int(%d) +bool(true) bool(true) -- Working with hard links -- bool(true) -int(%d) +bool(true) bool(false) *** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members of an array *** -- Working with soft links -- bool(true) -int(%d) +bool(true) bool(true) -- Working with hard links -- bool(true) -int(%d) +bool(true) bool(false) Done diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt index cde6783e15f18..69715be008ee0 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt @@ -1,11 +1,5 @@ --TEST-- Test symlink(), linkinfo(), link() and is_link() functions : usage variations - hardlink to non-existent file ---SKIPIF-- - --FILE-- --FILE-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt index 1bb3b76eaa5fb..ff2a3f0f4a66b 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt @@ -1,11 +1,5 @@ --TEST-- Test symlink(), linkinfo(), link() and is_link() functions : usage variations - access/update file through hard link ---SKIPIF-- - --FILE-- --FILE-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt index 7dc11a751d0f9..50296920c5e77 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt @@ -2,9 +2,6 @@ Test symlink(), linkinfo(), link() and is_link() functions : usage variations - link & dir perms. --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt index 222322f316b33..d46092f074434 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions : usage variations - try link to self --SKIPIF-- --FILE-- @@ -38,7 +39,11 @@ var_dump( symlink($dirname, $linkname) ); // create another link to $dirname var_dump( symlink($linkname, $linkname) ); // delete link -unlink($linkname); +if (PHP_OS_FAMILY === 'Windows') { + rmdir($linkname); +} else { + unlink($linkname); +} echo "\n*** Create hard link to file and then to itself ***\n"; // create hard link to $filename diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt index f284095d24b9d..ef9352bf003c9 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions : usage variations - try link with same name in diff. dir --SKIPIF-- --FILE-- @@ -64,7 +65,7 @@ bool(true) *** Create soft link in different directory with same filename *** -Warning: symlink(): File exists in %s on line %d +Warning: symlink(): %rFile exists|Permission denied%r in %s on line %d bool(false) bool(true) Done diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt index 0fd0b4838ea83..baf8a402cd14f 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt @@ -2,8 +2,9 @@ Test symlink(), linkinfo(), link() and is_link() functions : usage variations - link & lstat[dev] value --SKIPIF-- --FILE-- @@ -32,8 +33,8 @@ var_dump( symlink($filename, $soft_link) ); // confirming that linkinfo() = lstat['dev'] , this should always match $linkinfo = linkinfo($soft_link); $s1 = lstat($soft_link); -echo "linkinfo() returns : $linkinfo\n"; -echo "lstat() returns lstat['dev'] as $s1[0]\n"; +echo "linkinfo() returns integer !== -1: "; +var_dump(is_int($linkinfo) && $linkinfo !== -1); if( $s1[0] == $linkinfo ) echo "\nlinkinfo() value matches lstat['dev']\n"; else @@ -47,8 +48,8 @@ var_dump( link($filename, $hard_link) ); // confirming that linkinfo() = lstat['dev'] , this should always match $linkinfo = linkinfo($hard_link); $s1 = lstat($hard_link); -echo "linkinfo() returns : $linkinfo\n"; -echo "lstat() returns lstat['dev'] as $s1[0]\n"; +echo "linkinfo() returns integer !== -1: "; +var_dump(is_int($linkinfo) && $linkinfo !== -1); if( $s1[0] == $linkinfo ) echo "\nlinkinfo() value matches lstat['dev']\n"; else @@ -64,15 +65,19 @@ var_dump( symlink($dirname, $soft_link) ); // confirming that linkinfo() = lstat['dev'], this should always match $linkinfo = linkinfo($soft_link); $s1 = lstat($soft_link); -echo "linkinfo() returns : $linkinfo\n"; -echo "lstat() returns lstat['dev'] as $s1[0]\n"; +echo "linkinfo() returns integer !== -1: "; +var_dump(is_int($linkinfo) && $linkinfo !== -1); if( $s1[0] == $linkinfo ) echo "\nlinkinfo() value matches lstat['dev']\n"; else echo "\nWarning: linkinfo() value doesn't match lstat['dev']\n"; // delete link -unlink($soft_link); +if (PHP_OS_FAMILY === 'Windows') { + rmdir($soft_link); +} else { + unlink($soft_link); +} echo "Done\n"; ?> @@ -87,22 +92,19 @@ rmdir($dirname); --EXPECTF-- *** Checking lstat() on soft link *** bool(true) -linkinfo() returns : %d -lstat() returns lstat['dev'] as %d +linkinfo() returns integer !== -1: bool(true) linkinfo() value matches lstat['dev'] *** Checking lstat() on hard link *** bool(true) -linkinfo() returns : %d -lstat() returns lstat['dev'] as %d +linkinfo() returns integer !== -1: bool(true) linkinfo() value matches lstat['dev'] *** Checking lstat() on a soft link to directory *** bool(true) -linkinfo() returns : %d -lstat() returns lstat['dev'] as %d +linkinfo() returns integer !== -1: bool(true) linkinfo() value matches lstat['dev'] Done diff --git a/ext/standard/tests/file/symlink_to_symlink.phpt b/ext/standard/tests/file/symlink_to_symlink.phpt index c13c26d827f60..3fcea5fde4004 100644 --- a/ext/standard/tests/file/symlink_to_symlink.phpt +++ b/ext/standard/tests/file/symlink_to_symlink.phpt @@ -3,7 +3,7 @@ symlink() using a relative path, and symlink() to a symlink --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt index b904ef4533587..e85db00600ffb 100644 --- a/ext/standard/tests/file/unlink_error-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- --CLEAN-- --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt index e1bb075d2bb2d..8d2a80726a67c 100644 --- a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ -$file_path = __DIR__.DIRECTORY_SEPARATOR."私はガラスを食べられます"; +$file_path = __DIR__.DIRECTORY_SEPARATOR."unlinkVar1私はガラスを食べられます"; @mkdir($file_path); // temp dir name used here diff --git a/ext/standard/tests/filters/object_init_failure.phpt b/ext/standard/tests/filters/object_init_failure.phpt index 6375969e032e1..3a88d87ccab06 100644 --- a/ext/standard/tests/filters/object_init_failure.phpt +++ b/ext/standard/tests/filters/object_init_failure.phpt @@ -16,4 +16,4 @@ try { Warning: file_get_contents(): Unable to create or locate filter "sample.filter" in %s on line %d Warning: file_get_contents(): Unable to create filter (sample.filter) in %s on line %d -Undefined constant 'FOO' +Undefined constant "FOO" diff --git a/ext/standard/tests/filters/object_init_failure_2.phpt b/ext/standard/tests/filters/object_init_failure_2.phpt index 251ebf519ca87..32473bc83127d 100644 --- a/ext/standard/tests/filters/object_init_failure_2.phpt +++ b/ext/standard/tests/filters/object_init_failure_2.phpt @@ -16,4 +16,4 @@ try { Warning: main(): Unable to create or locate filter "sample.filter" in %s on line %d Warning: main(): Unable to create filter (sample.filter) in %s on line %d -Undefined constant 'FOO' +Undefined constant "FOO" diff --git a/ext/standard/tests/general_functions/bug72920.phpt b/ext/standard/tests/general_functions/bug72920.phpt index 24a87249044b1..cee43561de918 100644 --- a/ext/standard/tests/general_functions/bug72920.phpt +++ b/ext/standard/tests/general_functions/bug72920.phpt @@ -13,4 +13,4 @@ try { } ?> --EXPECT-- -Cannot access private const Foo::C1 +Cannot access private constant Foo::C1 diff --git a/ext/standard/tests/general_functions/callbacks_001.phpt b/ext/standard/tests/general_functions/callbacks_001.phpt index 67afab634564d..a1c5b4cdec562 100644 --- a/ext/standard/tests/general_functions/callbacks_001.phpt +++ b/ext/standard/tests/general_functions/callbacks_001.phpt @@ -106,4 +106,4 @@ O $this|O::who O $this|B::who -call_user_func(): Argument #1 ($function) must be a valid callback, class 'P' is not a subclass of 'B' +call_user_func(): Argument #1 ($function) must be a valid callback, class P is not a subclass of B diff --git a/ext/standard/tests/general_functions/callbacks_002.phpt b/ext/standard/tests/general_functions/callbacks_002.phpt index f69a886ad392b..220896df675ef 100644 --- a/ext/standard/tests/general_functions/callbacks_002.phpt +++ b/ext/standard/tests/general_functions/callbacks_002.phpt @@ -21,6 +21,6 @@ try { ?> --EXPECT-- -call_user_func(): Argument #1 ($function) must be a valid callback, class 'Foo' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class "Foo" not found call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object call_user_func(): Argument #1 ($function) must be a valid callback, second array member is not a valid method diff --git a/ext/standard/tests/general_functions/register_tick_function_error.phpt b/ext/standard/tests/general_functions/register_tick_function_error.phpt index c44dbe0872bc2..82564a83b425e 100644 --- a/ext/standard/tests/general_functions/register_tick_function_error.phpt +++ b/ext/standard/tests/general_functions/register_tick_function_error.phpt @@ -11,4 +11,4 @@ try { } ?> --EXPECT-- -register_tick_function(): Argument #1 ($function) must be a valid tick callback, 'a' given +register_tick_function(): Argument #1 ($function) must be a valid tick callback, "a" given diff --git a/ext/standard/tests/serialize/max_depth.phpt b/ext/standard/tests/serialize/max_depth.phpt index 79ab13e9f1658..312f22226c21c 100644 --- a/ext/standard/tests/serialize/max_depth.phpt +++ b/ext/standard/tests/serialize/max_depth.phpt @@ -104,8 +104,8 @@ var_dump(is_array(unserialize( ?> --EXPECTF-- Invalid max_depth: -unserialize(): 'max_depth' option must be of type int, string given -unserialize(): 'max_depth' option must be greater than or equal to 0 +unserialize(): "max_depth" option must be of type int, string given +unserialize(): "max_depth" option must be greater than or equal to 0 Array: bool(true) diff --git a/ext/standard/tests/serialize/serialization_objects_002.phpt b/ext/standard/tests/serialize/serialization_objects_002.phpt index ab77ece334133..ce9ad53f7add5 100644 Binary files a/ext/standard/tests/serialize/serialization_objects_002.phpt and b/ext/standard/tests/serialize/serialization_objects_002.phpt differ diff --git a/ext/standard/tests/streams/bug61115.phpt b/ext/standard/tests/streams/bug61115.phpt index ce6b57651cfa5..28a1838c1638a 100644 --- a/ext/standard/tests/streams/bug61115.phpt +++ b/ext/standard/tests/streams/bug61115.phpt @@ -9,9 +9,9 @@ $resourceFileTemp = fopen('php://temp', 'r+'); stream_context_set_params($resourceFileTemp, array()); try { preg_replace('', function() {}, $resourceFileTemp); -} catch (Error $e) { +} catch (\TypeError $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- -Object of class Closure could not be converted to string +preg_replace(): Argument #2 ($replace) must be of type string|array, Closure given diff --git a/ext/standard/tests/streams/bug77664.phpt b/ext/standard/tests/streams/bug77664.phpt index 01722033b5fc4..4d9a2e0cb22a5 100644 --- a/ext/standard/tests/streams/bug77664.phpt +++ b/ext/standard/tests/streams/bug77664.phpt @@ -10,7 +10,7 @@ stream_wrapper_register('error',ErrorWrapper::class); file_get_contents('error://test'); ?> --EXPECTF-- -Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in %sbug77664.php:%d +Fatal error: Uncaught Error: Undefined constant self::INVALID in %s:%d Stack trace: #0 %sbug77664.php(%d): file_get_contents('error://test') #1 {main} diff --git a/ext/standard/tests/strings/printf.phpt b/ext/standard/tests/strings/printf.phpt index 9d0b88e121c1b..d77dd71c36f43 100644 --- a/ext/standard/tests/strings/printf.phpt +++ b/ext/standard/tests/strings/printf.phpt @@ -683,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum 12345678900.00000000000000000000000000000000000000000000000000000 *** Output for invalid width(-15) specifier *** -Unknown format specifier '-' +Unknown format specifier "-" *** Output for '%F' as the format parameter *** 12345678900.000000 diff --git a/ext/standard/tests/strings/printf_64bit.phpt b/ext/standard/tests/strings/printf_64bit.phpt index 2990bd8570947..b0e364b9c98f2 100644 --- a/ext/standard/tests/strings/printf_64bit.phpt +++ b/ext/standard/tests/strings/printf_64bit.phpt @@ -683,7 +683,7 @@ Notice: printf(): Requested precision of 988 digits was truncated to PHP maximum 12345678900.0000000000%d *** Output for invalid width(-15) specifier *** -Unknown format specifier '-' +Unknown format specifier "-" *** Output for '%F' as the format parameter *** 12345678900.000000 diff --git a/ext/standard/tests/strings/sprintf_variation52.phpt b/ext/standard/tests/strings/sprintf_variation52.phpt index f41d7a182c803..e7e022a6fae65 100644 --- a/ext/standard/tests/strings/sprintf_variation52.phpt +++ b/ext/standard/tests/strings/sprintf_variation52.phpt @@ -50,7 +50,7 @@ Notice: sprintf(): Requested precision of 988 digits was truncated to PHP maximu string(65) "12345678900.00000000000000000000000000000000000000000000000000000" -- Testing for invalid width(-15) specifier -- -Unknown format specifier '-' +Unknown format specifier "-" -- Testing for '%X' as the format parameter -- string(1) "C" diff --git a/ext/standard/tests/strings/vfprintf_error3.phpt b/ext/standard/tests/strings/vfprintf_error3.phpt index 0f295416896db..703bc73ad8ced 100644 --- a/ext/standard/tests/strings/vfprintf_error3.phpt +++ b/ext/standard/tests/strings/vfprintf_error3.phpt @@ -49,5 +49,5 @@ unlink( $file ); -- Testing vfprintf() function with wrong variable types as argument -- vfprintf(): Argument #2 ($format) must be of type string, array given vfprintf(): Argument #3 ($args) must be of type array, string given -Unknown format specifier 'y' +Unknown format specifier "y" string(0) "" diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index e6c87169af258..93d4144721370 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -415,7 +415,7 @@ static void php_stream_bucket_attach(int append, INTERNAL_FUNCTION_PARAMETERS) ZEND_PARSE_PARAMETERS_END(); if (NULL == (pzbucket = zend_hash_str_find(Z_OBJPROP_P(zobject), "bucket", sizeof("bucket")-1))) { - zend_argument_value_error(2, "must be an object that has a 'bucket' property"); + zend_argument_value_error(2, "must be an object that has a \"bucket\" property"); RETURN_THROWS(); } diff --git a/ext/standard/var.c b/ext/standard/var.c index 7a868434fd677..17540f56cd3b2 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -127,16 +127,17 @@ PHPAPI void php_var_dump(zval *struc, int level) /* {{{ */ PUTS("*RECURSION*\n"); return; } + GC_ADDREF(myht); GC_PROTECT_RECURSION(myht); } count = zend_array_count(myht); php_printf("%sarray(%d) {\n", COMMON, count); - ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) { php_array_element_dump(val, num, key, level); } ZEND_HASH_FOREACH_END(); if (!(GC_FLAGS(myht) & GC_IMMUTABLE)) { GC_UNPROTECT_RECURSION(myht); + GC_DELREF(myht); } if (level > 1) { php_printf("%*c", level-1, ' '); @@ -302,20 +303,22 @@ PHPAPI void php_debug_zval_dump(zval *struc, int level) /* {{{ */ break; case IS_ARRAY: myht = Z_ARRVAL_P(struc); - if (level > 1 && !(GC_FLAGS(myht) & GC_IMMUTABLE)) { + if (!(GC_FLAGS(myht) & GC_IMMUTABLE)) { if (GC_IS_RECURSIVE(myht)) { PUTS("*RECURSION*\n"); return; } + GC_ADDREF(myht); GC_PROTECT_RECURSION(myht); } count = zend_array_count(myht); - php_printf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1); + php_printf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) - 1 : 1); ZEND_HASH_FOREACH_KEY_VAL_IND(myht, index, key, val) { zval_array_element_dump(val, index, key, level); } ZEND_HASH_FOREACH_END(); - if (level > 1 && !(GC_FLAGS(myht) & GC_IMMUTABLE)) { + if (!(GC_FLAGS(myht) & GC_IMMUTABLE)) { GC_UNPROTECT_RECURSION(myht); + GC_DELREF(myht); } if (level > 1) { php_printf("%*c", level - 1, ' '); @@ -518,6 +521,7 @@ PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */ zend_error(E_WARNING, "var_export does not handle circular references"); return; } + GC_ADDREF(myht); GC_PROTECT_RECURSION(myht); } if (level > 1) { @@ -530,6 +534,7 @@ PHPAPI void php_var_export_ex(zval *struc, int level, smart_str *buf) /* {{{ */ } ZEND_HASH_FOREACH_END(); if (!(GC_FLAGS(myht) & GC_IMMUTABLE)) { GC_UNPROTECT_RECURSION(myht); + GC_DELREF(myht); } if (level > 1) { buffer_append_spaces(buf, level - 1); @@ -1229,11 +1234,11 @@ PHP_FUNCTION(unserialize) max_depth = zend_hash_str_find_deref(Z_ARRVAL_P(options), "max_depth", sizeof("max_depth") - 1); if (max_depth) { if (Z_TYPE_P(max_depth) != IS_LONG) { - zend_type_error("unserialize(): 'max_depth' option must be of type int, %s given", zend_zval_type_name(max_depth)); + zend_type_error("unserialize(): \"max_depth\" option must be of type int, %s given", zend_zval_type_name(max_depth)); goto cleanup; } if (Z_LVAL_P(max_depth) < 0) { - zend_value_error("unserialize(): 'max_depth' option must be greater than or equal to 0"); + zend_value_error("unserialize(): \"max_depth\" option must be greater than or equal to 0"); goto cleanup; } diff --git a/ext/tidy/tests/035.phpt b/ext/tidy/tests/035.phpt index 1fe0d5c9f1c7c..720e095f75b4f 100644 --- a/ext/tidy/tests/035.phpt +++ b/ext/tidy/tests/035.phpt @@ -9,7 +9,7 @@ tidyNode::__construct() new tidyNode; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private tidyNode::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private tidyNode::__construct() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/ext/tokenizer/tests/PhpToken_extension_errors.phpt b/ext/tokenizer/tests/PhpToken_extension_errors.phpt index 89604a90512b6..d2bee1bc8f440 100644 --- a/ext/tokenizer/tests/PhpToken_extension_errors.phpt +++ b/ext/tokenizer/tests/PhpToken_extension_errors.phpt @@ -26,5 +26,5 @@ try { ?> --EXPECT-- -Undefined constant 'UNKNOWN' +Undefined constant "UNKNOWN" Cannot instantiate abstract class MyPhpToken2 diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c index 9c7df932076ce..14630cdd4014c 100644 --- a/ext/tokenizer/tokenizer_data.c +++ b/ext/tokenizer/tokenizer_data.c @@ -84,8 +84,6 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_STRING_VARNAME", T_STRING_VARNAME, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_NUM_STRING", T_NUM_STRING, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_EVAL", T_EVAL, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_INC", T_INC, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_DEC", T_DEC, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_NEW", T_NEW, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_EXIT", T_EXIT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_IF", T_IF, CONST_CS | CONST_PERSISTENT); @@ -105,6 +103,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_ENDSWITCH", T_ENDSWITCH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_CASE", T_CASE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_DEFAULT", T_DEFAULT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_MATCH", T_MATCH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_BREAK", T_BREAK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_CONTINUE", T_CONTINUE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_GOTO", T_GOTO, CONST_CS | CONST_PERSISTENT); @@ -134,7 +133,7 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_INTERFACE", T_INTERFACE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_EXTENDS", T_EXTENDS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_IMPLEMENTS", T_IMPLEMENTS, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_OBJECT_OPERATOR", T_OBJECT_OPERATOR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_NAMESPACE", T_NAMESPACE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_LIST", T_LIST, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_ARRAY", T_ARRAY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_CALLABLE", T_CALLABLE, CONST_CS | CONST_PERSISTENT); @@ -145,6 +144,10 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_TRAIT_C", T_TRAIT_C, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_METHOD_C", T_METHOD_C, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_FUNC_C", T_FUNC_C, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_NS_C", T_NS_C, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_INC", T_INC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_DEC", T_DEC, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("T_OBJECT_OPERATOR", T_OBJECT_OPERATOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_COMMENT", T_COMMENT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_DOC_COMMENT", T_DOC_COMMENT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_OPEN_TAG", T_OPEN_TAG, CONST_CS | CONST_PERSISTENT); @@ -156,8 +159,6 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) { REGISTER_LONG_CONSTANT("T_DOLLAR_OPEN_CURLY_BRACES", T_DOLLAR_OPEN_CURLY_BRACES, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_CURLY_OPEN", T_CURLY_OPEN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_PAAMAYIM_NEKUDOTAYIM", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_NAMESPACE", T_NAMESPACE, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("T_NS_C", T_NS_C, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_NS_SEPARATOR", T_NS_SEPARATOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_ELLIPSIS", T_ELLIPSIS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("T_BAD_CHARACTER", T_BAD_CHARACTER, CONST_CS | CONST_PERSISTENT); @@ -227,8 +228,6 @@ char *get_token_type_name(int token_type) case T_STRING_VARNAME: return "T_STRING_VARNAME"; case T_NUM_STRING: return "T_NUM_STRING"; case T_EVAL: return "T_EVAL"; - case T_INC: return "T_INC"; - case T_DEC: return "T_DEC"; case T_NEW: return "T_NEW"; case T_EXIT: return "T_EXIT"; case T_IF: return "T_IF"; @@ -248,6 +247,7 @@ char *get_token_type_name(int token_type) case T_ENDSWITCH: return "T_ENDSWITCH"; case T_CASE: return "T_CASE"; case T_DEFAULT: return "T_DEFAULT"; + case T_MATCH: return "T_MATCH"; case T_BREAK: return "T_BREAK"; case T_CONTINUE: return "T_CONTINUE"; case T_GOTO: return "T_GOTO"; @@ -277,7 +277,7 @@ char *get_token_type_name(int token_type) case T_INTERFACE: return "T_INTERFACE"; case T_EXTENDS: return "T_EXTENDS"; case T_IMPLEMENTS: return "T_IMPLEMENTS"; - case T_OBJECT_OPERATOR: return "T_OBJECT_OPERATOR"; + case T_NAMESPACE: return "T_NAMESPACE"; case T_LIST: return "T_LIST"; case T_ARRAY: return "T_ARRAY"; case T_CALLABLE: return "T_CALLABLE"; @@ -288,6 +288,10 @@ char *get_token_type_name(int token_type) case T_TRAIT_C: return "T_TRAIT_C"; case T_METHOD_C: return "T_METHOD_C"; case T_FUNC_C: return "T_FUNC_C"; + case T_NS_C: return "T_NS_C"; + case T_INC: return "T_INC"; + case T_DEC: return "T_DEC"; + case T_OBJECT_OPERATOR: return "T_OBJECT_OPERATOR"; case T_COMMENT: return "T_COMMENT"; case T_DOC_COMMENT: return "T_DOC_COMMENT"; case T_OPEN_TAG: return "T_OPEN_TAG"; @@ -299,8 +303,6 @@ char *get_token_type_name(int token_type) case T_DOLLAR_OPEN_CURLY_BRACES: return "T_DOLLAR_OPEN_CURLY_BRACES"; case T_CURLY_OPEN: return "T_CURLY_OPEN"; case T_PAAMAYIM_NEKUDOTAYIM: return "T_DOUBLE_COLON"; - case T_NAMESPACE: return "T_NAMESPACE"; - case T_NS_C: return "T_NS_C"; case T_NS_SEPARATOR: return "T_NS_SEPARATOR"; case T_ELLIPSIS: return "T_ELLIPSIS"; case T_BAD_CHARACTER: return "T_BAD_CHARACTER"; diff --git a/ext/zlib/tests/005.phpt b/ext/zlib/tests/005.phpt index da81c48c73096..6b0be2897d935 100644 --- a/ext/zlib/tests/005.phpt +++ b/ext/zlib/tests/005.phpt @@ -44,7 +44,7 @@ var_dump(gzuncompress($data2)); ?> --EXPECTF-- -Compression level (1000) must be within -1..9 +gzcompress(): Argument #2 ($level) must be between -1 and 9 string(%d) "%a" string(%d) "%a" string(%d) "%a" @@ -53,7 +53,7 @@ string(%d) "%a" Warning: gzuncompress(): %s error in %s on line %d bool(false) -Length (-1) must be greater or equal zero +gzuncompress(): Argument #2 ($max_decoded_len) must be greater than or equal to 0 Warning: gzuncompress(): %s error in %s on line %d bool(false) diff --git a/ext/zlib/tests/006.phpt b/ext/zlib/tests/006.phpt index 32965ea65a565..692759e886bb1 100644 --- a/ext/zlib/tests/006.phpt +++ b/ext/zlib/tests/006.phpt @@ -42,7 +42,7 @@ var_dump(gzinflate($data2)); ?> --EXPECTF-- -Compression level (1000) must be within -1..9 +gzcompress(): Argument #2 ($level) must be between -1 and 9 string(%d) "%a" string(%d) "%a" string(%d) "%a" @@ -54,7 +54,7 @@ bool(false) Warning: gzinflate(): data error in %s on line %d bool(false) -Length (-1) must be greater or equal zero +gzinflate(): Argument #2 ($max_decoded_len) must be greater than or equal to 0 Warning: gzinflate(): data error in %s on line %d bool(false) diff --git a/ext/zlib/tests/007.phpt b/ext/zlib/tests/007.phpt index f51d0d3fc5971..b9255557ff08e 100644 --- a/ext/zlib/tests/007.phpt +++ b/ext/zlib/tests/007.phpt @@ -40,11 +40,11 @@ var_dump(gzencode($string, 9, ZLIB_ENCODING_DEFLATE)); ?> --EXPECTF-- -Compression level (-10) must be within -1..9 -Compression level (100) must be within -1..9 -Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #2 ($level) must be between -1 and 9 +gzencode(): Argument #2 ($level) must be between -1 and 9 +gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE string(%d) "%a" string(%d) "%a" -Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE string(%d) "%a" string(%d) "%a" diff --git a/ext/zlib/tests/gzcompress_error1.phpt b/ext/zlib/tests/gzcompress_error1.phpt index c63df4347cefc..e559030151dc2 100644 --- a/ext/zlib/tests/gzcompress_error1.phpt +++ b/ext/zlib/tests/gzcompress_error1.phpt @@ -38,7 +38,7 @@ try { *** Testing gzcompress() : error conditions *** -- Testing with incorrect compression level -- -Compression level (99) must be within -1..9 +gzcompress(): Argument #2 ($level) must be between -1 and 9 -- Testing with invalid encoding -- -Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE +gzcompress(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt index f229b353ed2e6..fbcb2d95f317c 100644 --- a/ext/zlib/tests/gzdeflate_error1.phpt +++ b/ext/zlib/tests/gzdeflate_error1.phpt @@ -38,7 +38,7 @@ try { *** Testing gzdeflate() : error conditions *** -- Testing with incorrect compression level -- -Compression level (99) must be within -1..9 +gzdeflate(): Argument #2 ($level) must be between -1 and 9 -- Testing with incorrect encoding -- -Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE +gzdeflate(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/tests/gzencode_error1.phpt b/ext/zlib/tests/gzencode_error1.phpt index 062497ef11fd7..5d850e5438af7 100644 --- a/ext/zlib/tests/gzencode_error1.phpt +++ b/ext/zlib/tests/gzencode_error1.phpt @@ -39,7 +39,7 @@ try { *** Testing gzencode() : error conditions *** -- Testing with incorrect compression level -- -Compression level (99) must be within -1..9 +gzencode(): Argument #2 ($level) must be between -1 and 9 -- Testing with incorrect encoding_mode -- -Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE +gzencode(): Argument #3 ($encoding) must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index eee9786e88869..6ddda3d7a2649 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -716,7 +716,7 @@ PHP_FUNCTION(name) \ } \ } \ if (level < -1 || level > 9) { \ - zend_value_error("Compression level (" ZEND_LONG_FMT ") must be within -1..9", level); \ + zend_argument_value_error(default_encoding ? 2 : 3, "must be between -1 and 9"); \ RETURN_THROWS(); \ } \ switch (encoding) { \ @@ -725,7 +725,7 @@ PHP_FUNCTION(name) \ case PHP_ZLIB_ENCODING_DEFLATE: \ break; \ default: \ - zend_value_error("Encoding mode must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP or ZLIB_ENCODING_DEFLATE"); \ + zend_argument_value_error(default_encoding ? 3 : 2, "must be either ZLIB_ENCODING_RAW, ZLIB_ENCODING_GZIP, or ZLIB_ENCODING_DEFLATE"); \ RETURN_THROWS(); \ } \ if ((out = php_zlib_encode(ZSTR_VAL(in), ZSTR_LEN(in), encoding, level)) == NULL) { \ @@ -745,7 +745,7 @@ PHP_FUNCTION(name) \ RETURN_THROWS(); \ } \ if (max_len < 0) { \ - zend_value_error("Length (" ZEND_LONG_FMT ") must be greater or equal zero", max_len); \ + zend_argument_value_error(2, "must be greater than or equal to 0"); \ RETURN_THROWS(); \ } \ if (SUCCESS != php_zlib_decode(in_buf, in_len, &out_buf, &out_len, encoding, max_len)) { \ diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 34d0590f44a82..f33c65df68e5e 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -1030,7 +1030,7 @@ PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, zen if (FAILURE == php_stream_parse_fopen_modes(mode, &open_flags)) { if (options & REPORT_ERRORS) { - zend_value_error("`%s' is not a valid mode for fopen", mode); + zend_value_error("\"%s\" is not a valid mode for fopen", mode); } return NULL; } diff --git a/php.ini-development b/php.ini-development index 4acfa89a197c6..5471728ce0bf4 100644 --- a/php.ini-development +++ b/php.ini-development @@ -901,7 +901,7 @@ default_socket_timeout = 60 ;extension=ffi ;extension=ftp ;extension=fileinfo -;extension=gd2 +;extension=gd ;extension=gettext ;extension=gmp ;extension=intl diff --git a/php.ini-production b/php.ini-production index 2fdcdc0e5d3d2..08fc7557384bb 100644 --- a/php.ini-production +++ b/php.ini-production @@ -903,7 +903,7 @@ default_socket_timeout = 60 ;extension=ffi ;extension=ftp ;extension=fileinfo -;extension=gd2 +;extension=gd ;extension=gettext ;extension=gmp ;extension=intl diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index acbe69a7a9228..8048085ebe0ee 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -63,6 +63,7 @@ #include "fopen_wrappers.h" #include "http_status_codes.h" #include "ext/standard/php_standard.h" +#include "ext/standard/dl_arginfo.h" #include "ext/standard/url.h" #ifdef PHP_WIN32 @@ -83,6 +84,7 @@ int __riscosify_control = __RISCOSIFY_STRICT_UNIX_SPECS; #include "php_getopt.h" #include "fastcgi.h" +#include "cgi_main_arginfo.h" #if defined(PHP_WIN32) && defined(HAVE_OPENSSL) # include "openssl/applink.c" @@ -1006,12 +1008,6 @@ static sapi_module_struct cgi_sapi_module = { }; /* }}} */ -/* {{{ arginfo ext/standard/dl.c */ -ZEND_BEGIN_ARG_INFO(arginfo_dl, 0) - ZEND_ARG_INFO(0, extension_filename) -ZEND_END_ARG_INFO() -/* }}} */ - static const zend_function_entry additional_functions[] = { ZEND_FE(dl, arginfo_dl) PHP_FE_END @@ -1704,21 +1700,10 @@ PHP_FUNCTION(apache_response_headers) /* {{{ */ } /* }}} */ -ZEND_BEGIN_ARG_INFO(arginfo_no_args, 0) -ZEND_END_ARG_INFO() - -static const zend_function_entry cgi_functions[] = { - PHP_FE(apache_child_terminate, arginfo_no_args) - PHP_FE(apache_request_headers, arginfo_no_args) - PHP_FE(apache_response_headers, arginfo_no_args) - PHP_FALIAS(getallheaders, apache_request_headers, arginfo_no_args) - PHP_FE_END -}; - static zend_module_entry cgi_module_entry = { STANDARD_MODULE_HEADER, "cgi-fcgi", - cgi_functions, + ext_functions, PHP_MINIT(cgi), PHP_MSHUTDOWN(cgi), NULL, diff --git a/sapi/cgi/cgi_main.stub.php b/sapi/cgi/cgi_main.stub.php new file mode 100644 index 0000000000000..8273cffdc2a59 --- /dev/null +++ b/sapi/cgi/cgi_main.stub.php @@ -0,0 +1,12 @@ + @@ -78,6 +79,7 @@ #include "ps_title.h" #include "php_cli_process_title.h" +#include "php_cli_process_title_arginfo.h" #ifndef PHP_WIN32 # define php_select(m, r, w, e, t) select(m, r, w, e, t) @@ -457,12 +459,6 @@ static sapi_module_struct cli_sapi_module = { }; /* }}} */ -/* {{{ arginfo ext/standard/dl.c */ -ZEND_BEGIN_ARG_INFO(arginfo_dl, 0) - ZEND_ARG_INFO(0, extension_filename) -ZEND_END_ARG_INFO() -/* }}} */ - static const zend_function_entry additional_functions[] = { ZEND_FE(dl, arginfo_dl) PHP_FE(cli_set_process_title, arginfo_cli_set_process_title) diff --git a/sapi/cli/php_cli_process_title.h b/sapi/cli/php_cli_process_title.h index 74766491d726f..c286f401c7d9f 100644 --- a/sapi/cli/php_cli_process_title.h +++ b/sapi/cli/php_cli_process_title.h @@ -17,13 +17,6 @@ #ifndef PHP_PS_TITLE_HEADER #define PHP_PS_TITLE_HEADER -ZEND_BEGIN_ARG_INFO(arginfo_cli_set_process_title, 0) - ZEND_ARG_INFO(0, title) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO(arginfo_cli_get_process_title, 0) -ZEND_END_ARG_INFO() - PHP_FUNCTION(cli_set_process_title); PHP_FUNCTION(cli_get_process_title); diff --git a/sapi/cli/php_cli_process_title.stub.php b/sapi/cli/php_cli_process_title.stub.php new file mode 100644 index 0000000000000..97dc8b2770555 --- /dev/null +++ b/sapi/cli/php_cli_process_title.stub.php @@ -0,0 +1,5 @@ + --EXPECT-- -string(40) "Exception: Class unknown does not exist +string(42) "Exception: Class "unknown" does not exist " string(183) "Class [ class stdClass ] { diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index 8d15e653625af..eac538017837e 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -24,9 +24,9 @@ var_dump(`$php -n --re pcre`); echo "Done\n"; ?> --EXPECTF-- -string(44) "Exception: Extension unknown does not exist +string(46) "Exception: Extension "unknown" does not exist " -string(37) "Exception: Extension does not exist +string(39) "Exception: Extension "" does not exist " string(%d) "Extension [ extension #%d pcre version %s ] { @@ -90,9 +90,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_replace ] { - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] + Parameter #0 [ array|string $regex ] + Parameter #1 [ array|string $replace ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit = -1 ] Parameter #4 [ &$count = null ] } @@ -101,9 +101,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_filter ] { - Parameters [5] { - Parameter #0 [ $regex ] - Parameter #1 [ $replace ] - Parameter #2 [ $subject ] + Parameter #0 [ array|string $regex ] + Parameter #1 [ array|string $replace ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit = -1 ] Parameter #4 [ &$count = null ] } @@ -112,9 +112,9 @@ string(%d) "Extension [ extension #%d pcre version %s ] { Function [ function preg_replace_callback ] { - Parameters [6] { - Parameter #0 [ $regex ] + Parameter #0 [ array|string $regex ] Parameter #1 [ callable $callback ] - Parameter #2 [ $subject ] + Parameter #2 [ array|string $subject ] Parameter #3 [ int $limit = -1 ] Parameter #4 [ &$count = null ] Parameter #5 [ int $flags = 0 ] diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c index 1d1d43e56b20b..b510d5105e5f6 100644 --- a/sapi/embed/php_embed.c +++ b/sapi/embed/php_embed.c @@ -16,6 +16,7 @@ #include "php_embed.h" #include "ext/standard/php_standard.h" +#include "ext/standard/dl_arginfo.h" #ifdef PHP_WIN32 #include @@ -142,15 +143,9 @@ EMBED_SAPI_API sapi_module_struct php_embed_module = { }; /* }}} */ -/* {{{ arginfo ext/standard/dl.c */ -ZEND_BEGIN_ARG_INFO(arginfo_dl, 0) - ZEND_ARG_INFO(0, extension_filename) -ZEND_END_ARG_INFO() -/* }}} */ - static const zend_function_entry additional_functions[] = { ZEND_FE(dl, arginfo_dl) - {NULL, NULL, NULL} + ZEND_FE_END }; EMBED_SAPI_API int php_embed_init(int argc, char **argv) diff --git a/tests/classes/array_access_001.phpt b/tests/classes/array_access_001.phpt index ae2669b670e42..87da97ac201c0 100644 --- a/tests/classes/array_access_001.phpt +++ b/tests/classes/array_access_001.phpt @@ -134,11 +134,11 @@ ObjectOne::offsetGet(4th) int(4) ObjectOne::offsetGet(5th) -Notice: Undefined index: 5th in %sarray_access_001.php on line %d +Notice: Undefined array key "5th" in %s on line %d NULL ObjectOne::offsetGet(6) -Notice: Undefined offset: 6 in %sarray_access_001.php on line %d +Notice: Undefined array key 6 in %s on line %d NULL ===offsetSet=== WRITE 1 diff --git a/tests/classes/array_access_002.phpt b/tests/classes/array_access_002.phpt index 79f4a52853c38..0f12811b49c4c 100644 --- a/tests/classes/array_access_002.phpt +++ b/tests/classes/array_access_002.phpt @@ -134,11 +134,11 @@ ObjectOne::offsetGet(4th) int(4) ObjectOne::offsetGet(5th) -Notice: Undefined index: 5th in %sarray_access_002.php on line %d +Notice: Undefined array key "5th" in %s on line %d NULL ObjectOne::offsetGet(6) -Notice: Undefined offset: 6 in %sarray_access_002.php on line %d +Notice: Undefined array key 6 in %s on line %d NULL ===offsetSet=== WRITE 1 diff --git a/tests/classes/autoload_010.phpt b/tests/classes/autoload_010.phpt index b8aa660730be8..8b00c9c83544c 100644 --- a/tests/classes/autoload_010.phpt +++ b/tests/classes/autoload_010.phpt @@ -14,7 +14,7 @@ class C implements UndefI --EXPECTF-- In autoload: string(6) "UndefI" -Fatal error: Uncaught Error: Interface 'UndefI' not found in %s:%d +Fatal error: Uncaught Error: Interface "UndefI" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/autoload_011.phpt b/tests/classes/autoload_011.phpt index d255a0d23b4da..727c13c82749f 100644 --- a/tests/classes/autoload_011.phpt +++ b/tests/classes/autoload_011.phpt @@ -14,7 +14,7 @@ class C extends UndefBase --EXPECTF-- In autoload: string(9) "UndefBase" -Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d +Fatal error: Uncaught Error: Class "UndefBase" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/autoload_012.phpt b/tests/classes/autoload_012.phpt index 7a168b3275a4a..c8dc35b6f1a59 100644 --- a/tests/classes/autoload_012.phpt +++ b/tests/classes/autoload_012.phpt @@ -14,4 +14,4 @@ try { ?> --EXPECT-- In autoload: string(6) "UndefC" -call_user_func(): Argument #1 ($function) must be a valid callback, class 'UndefC' not found +call_user_func(): Argument #1 ($function) must be a valid callback, class "UndefC" not found diff --git a/tests/classes/autoload_013.phpt b/tests/classes/autoload_013.phpt index c85c18ec158b4..1b9302747eff5 100644 --- a/tests/classes/autoload_013.phpt +++ b/tests/classes/autoload_013.phpt @@ -16,4 +16,4 @@ catch (ReflectionException $e) { ?> --EXPECT-- In autoload: string(6) "UndefC" -Class UndefC does not exist +Class "UndefC" does not exist diff --git a/tests/classes/autoload_014.phpt b/tests/classes/autoload_014.phpt index 827224aaa52f1..13f16f8264061 100644 --- a/tests/classes/autoload_014.phpt +++ b/tests/classes/autoload_014.phpt @@ -16,4 +16,4 @@ catch (ReflectionException $e) { ?> --EXPECT-- In autoload: string(6) "UndefC" -Class UndefC does not exist +Class "UndefC" does not exist diff --git a/tests/classes/autoload_015.phpt b/tests/classes/autoload_015.phpt index 9f023d5be5bc3..9aa862a7834d5 100644 --- a/tests/classes/autoload_015.phpt +++ b/tests/classes/autoload_015.phpt @@ -16,4 +16,4 @@ catch (ReflectionException $e) { ?> --EXPECT-- In autoload: string(6) "UndefC" -Class UndefC does not exist +Class "UndefC" does not exist diff --git a/tests/classes/autoload_016.phpt b/tests/classes/autoload_016.phpt index ceb8ce6bbc811..13454d018cdd5 100644 --- a/tests/classes/autoload_016.phpt +++ b/tests/classes/autoload_016.phpt @@ -17,4 +17,4 @@ $rc->getProperty("UndefC::p"); ?> --EXPECT-- In autoload: string(6) "undefc" -Class undefc does not exist +Class "undefc" does not exist diff --git a/tests/classes/autoload_017.phpt b/tests/classes/autoload_017.phpt index a1485f3aeb819..ef327ed37620f 100644 --- a/tests/classes/autoload_017.phpt +++ b/tests/classes/autoload_017.phpt @@ -17,4 +17,4 @@ try { ?> --EXPECT-- In autoload: string(6) "UndefI" -Interface UndefI does not exist +Interface "UndefI" does not exist diff --git a/tests/classes/autoload_021.phpt b/tests/classes/autoload_021.phpt index 673813cb2e2b0..859a9116696e2 100644 --- a/tests/classes/autoload_021.phpt +++ b/tests/classes/autoload_021.phpt @@ -10,7 +10,7 @@ $x = new $a; echo "BUG\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Class '../BUG' not found in %sautoload_021.php:6 +Fatal error: Uncaught Error: Class "../BUG" not found in %s:%d Stack trace: #0 {main} thrown in %sautoload_021.php on line 6 diff --git a/tests/classes/bug27504.phpt b/tests/classes/bug27504.phpt index 74d14c8a40885..b6df46920adaf 100644 --- a/tests/classes/bug27504.phpt +++ b/tests/classes/bug27504.phpt @@ -28,4 +28,4 @@ try { --EXPECT-- Called function foo:bar(1) call_user_func_array(): Argument #1 ($function) must be a valid callback, cannot access private method foo::bar() -Call to private method foo::bar() from context '' +Call to private method foo::bar() from global scope diff --git a/tests/classes/bug75765.phpt b/tests/classes/bug75765.phpt index b3c8a17f6f25b..dc283ae5fedb6 100644 --- a/tests/classes/bug75765.phpt +++ b/tests/classes/bug75765.phpt @@ -16,7 +16,7 @@ try { bool(false) bool(false) -Fatal error: Uncaught Error: Class 'B' not found in %s:%d +Fatal error: Uncaught Error: Class "B" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/constants_basic_001.phpt b/tests/classes/constants_basic_001.phpt index c052d3570143d..18ac2416f5dbc 100644 --- a/tests/classes/constants_basic_001.phpt +++ b/tests/classes/constants_basic_001.phpt @@ -79,7 +79,7 @@ string(6) "hello2" Expecting fatal error: -Fatal error: Uncaught Error: Undefined class constant 'C::c19' in %s:%d +Fatal error: Uncaught Error: Undefined constant C::c19 in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/constants_error_004.phpt b/tests/classes/constants_error_004.phpt index b7f668909bf11..3d675652ba241 100644 --- a/tests/classes/constants_error_004.phpt +++ b/tests/classes/constants_error_004.phpt @@ -10,7 +10,7 @@ Class constant whose initial value references a non-existent class $a = new C(); ?> --EXPECTF-- -Fatal error: Uncaught Error: Class 'D' not found in %s:%d +Fatal error: Uncaught Error: Class "D" not found in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/constants_visibility_002.phpt b/tests/classes/constants_visibility_002.phpt index 58c35b7a4a338..38fa8d614e768 100644 --- a/tests/classes/constants_visibility_002.phpt +++ b/tests/classes/constants_visibility_002.phpt @@ -24,4 +24,4 @@ try { --EXPECT-- string(14) "protectedConst" string(14) "protectedConst" -Cannot access protected const A::protectedConst +Cannot access protected constant A::protectedConst diff --git a/tests/classes/constants_visibility_003.phpt b/tests/classes/constants_visibility_003.phpt index 7492af90dfb00..7650ca80c8944 100644 --- a/tests/classes/constants_visibility_003.phpt +++ b/tests/classes/constants_visibility_003.phpt @@ -24,4 +24,4 @@ try { --EXPECT-- string(12) "privateConst" string(12) "privateConst" -Cannot access private const A::privateConst +Cannot access private constant A::privateConst diff --git a/tests/classes/constants_visibility_004.phpt b/tests/classes/constants_visibility_004.phpt index d35597b365c9b..3872bc2829d09 100644 --- a/tests/classes/constants_visibility_004.phpt +++ b/tests/classes/constants_visibility_004.phpt @@ -21,7 +21,7 @@ B::checkConstants(); int(1) int(2) -Fatal error: Uncaught Error: Undefined class constant 'B::Z' in %s:11 +Fatal error: Uncaught Error: Undefined constant B::Z in %s:%d Stack trace: #0 %s(15): B::checkConstants() #1 {main} diff --git a/tests/classes/constants_visibility_error_001.phpt b/tests/classes/constants_visibility_error_001.phpt index 35ccf1e83d199..368d828a17d24 100644 --- a/tests/classes/constants_visibility_error_001.phpt +++ b/tests/classes/constants_visibility_error_001.phpt @@ -10,7 +10,7 @@ var_dump(A::privateConst); ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access private const A::privateConst in %s:6 +Fatal error: Uncaught Error: Cannot access private constant A::privateConst in %s:6 Stack trace: #0 {main} thrown in %s on line 6 diff --git a/tests/classes/constants_visibility_error_002.phpt b/tests/classes/constants_visibility_error_002.phpt index 2068862942f1e..c417b947e5b15 100644 --- a/tests/classes/constants_visibility_error_002.phpt +++ b/tests/classes/constants_visibility_error_002.phpt @@ -10,7 +10,7 @@ var_dump(A::protectedConst); ?> --EXPECTF-- -Fatal error: Uncaught Error: Cannot access protected const A::protectedConst in %s:6 +Fatal error: Uncaught Error: Cannot access protected constant A::protectedConst in %s:6 Stack trace: #0 {main} thrown in %s on line 6 diff --git a/tests/classes/destructor_visibility_001.phpt b/tests/classes/destructor_visibility_001.phpt index 41def0e52523f..6fee6e3be742f 100644 --- a/tests/classes/destructor_visibility_001.phpt +++ b/tests/classes/destructor_visibility_001.phpt @@ -19,7 +19,7 @@ unset($obj); ?> ===DONE=== --EXPECTF-- -Fatal error: Uncaught Error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d +Fatal error: Uncaught Error: Call to private Derived::__destruct() from global scope in %s:%d Stack trace: #0 {main} thrown in %sdestructor_visibility_001.php on line %d diff --git a/tests/classes/destructor_visibility_002.phpt b/tests/classes/destructor_visibility_002.phpt index 227cc1aff0511..0d4cedcf795f9 100644 --- a/tests/classes/destructor_visibility_002.phpt +++ b/tests/classes/destructor_visibility_002.phpt @@ -16,7 +16,7 @@ $obj = new Derived; ?> ===DONE=== ---EXPECTF-- +--EXPECT-- ===DONE=== -Warning: Call to private Derived::__destruct() from context '' during shutdown ignored in Unknown on line %d +Warning: Call to private Derived::__destruct() from global scope during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/factory_and_singleton_002.phpt b/tests/classes/factory_and_singleton_002.phpt index c4132f9d382f0..82c6c5c28ab37 100644 --- a/tests/classes/factory_and_singleton_002.phpt +++ b/tests/classes/factory_and_singleton_002.phpt @@ -95,4 +95,4 @@ int(1) int(1) Done -Warning: Call to protected test::__destruct() from context '' during shutdown ignored in Unknown on line 0 +Warning: Call to protected test::__destruct() from global scope during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/factory_and_singleton_003.phpt b/tests/classes/factory_and_singleton_003.phpt index cf08fdb717417..1e111046bf8cc 100644 --- a/tests/classes/factory_and_singleton_003.phpt +++ b/tests/classes/factory_and_singleton_003.phpt @@ -13,7 +13,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to protected test::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to protected test::__construct() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_004.phpt b/tests/classes/factory_and_singleton_004.phpt index 41e278bdb97f7..f813f8e60455c 100644 --- a/tests/classes/factory_and_singleton_004.phpt +++ b/tests/classes/factory_and_singleton_004.phpt @@ -13,7 +13,7 @@ $obj = new test; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private test::__construct() from invalid context in %s:%d +Fatal error: Uncaught Error: Call to private test::__construct() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_005.phpt b/tests/classes/factory_and_singleton_005.phpt index 78d7e05f0bfe4..41914bf0e087d 100644 --- a/tests/classes/factory_and_singleton_005.phpt +++ b/tests/classes/factory_and_singleton_005.phpt @@ -14,7 +14,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to protected test::__destruct() from context '' in %sfactory_and_singleton_005.php:%d +Fatal error: Uncaught Error: Call to protected test::__destruct() from global scope in %s:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_005.php on line %d diff --git a/tests/classes/factory_and_singleton_006.phpt b/tests/classes/factory_and_singleton_006.phpt index b11c9f05d460e..596a0792cd092 100644 --- a/tests/classes/factory_and_singleton_006.phpt +++ b/tests/classes/factory_and_singleton_006.phpt @@ -14,7 +14,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php:%d +Fatal error: Uncaught Error: Call to private test::__destruct() from global scope in %s:%d Stack trace: #0 {main} thrown in %sfactory_and_singleton_006.php on line %d diff --git a/tests/classes/factory_and_singleton_007.phpt b/tests/classes/factory_and_singleton_007.phpt index 4c15c38383e13..2c35090eed5e0 100644 --- a/tests/classes/factory_and_singleton_007.phpt +++ b/tests/classes/factory_and_singleton_007.phpt @@ -15,7 +15,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to protected test::__clone() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected test::__clone() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_008.phpt b/tests/classes/factory_and_singleton_008.phpt index 1a87833169b97..2b2c0721c75e5 100644 --- a/tests/classes/factory_and_singleton_008.phpt +++ b/tests/classes/factory_and_singleton_008.phpt @@ -15,7 +15,7 @@ $obj = NULL; echo "Done\n"; ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to private test::__clone() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private test::__clone() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/factory_and_singleton_009.phpt b/tests/classes/factory_and_singleton_009.phpt index 7795ea4a7965b..6f2014f48cc68 100644 --- a/tests/classes/factory_and_singleton_009.phpt +++ b/tests/classes/factory_and_singleton_009.phpt @@ -16,4 +16,4 @@ $obj = new test; --EXPECT-- ===DONE=== -Warning: Call to protected test::__destruct() from context '' during shutdown ignored in Unknown on line 0 +Warning: Call to protected test::__destruct() from global scope during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/factory_and_singleton_010.phpt b/tests/classes/factory_and_singleton_010.phpt index a816b3f60f4c8..82fa720b16e9d 100644 --- a/tests/classes/factory_and_singleton_010.phpt +++ b/tests/classes/factory_and_singleton_010.phpt @@ -16,4 +16,4 @@ $obj = new test; --EXPECT-- ===DONE=== -Warning: Call to private test::__destruct() from context '' during shutdown ignored in Unknown on line 0 +Warning: Call to private test::__destruct() from global scope during shutdown ignored in Unknown on line 0 diff --git a/tests/classes/private_001.phpt b/tests/classes/private_001.phpt index 34e716e3342a6..99ce5e38fff4d 100644 --- a/tests/classes/private_001.phpt +++ b/tests/classes/private_001.phpt @@ -21,7 +21,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context '' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/private_002.phpt b/tests/classes/private_002.phpt index 7f8532450360a..ab36114be1dbc 100644 --- a/tests/classes/private_002.phpt +++ b/tests/classes/private_002.phpt @@ -30,7 +30,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/private_003.phpt b/tests/classes/private_003.phpt index c142ad5cc7cd0..723e77768730b 100644 --- a/tests/classes/private_003.phpt +++ b/tests/classes/private_003.phpt @@ -31,7 +31,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail::not_ok() #1 {main} diff --git a/tests/classes/private_003b.phpt b/tests/classes/private_003b.phpt index 9c5e5cbb9a884..6b231c55758e3 100644 --- a/tests/classes/private_003b.phpt +++ b/tests/classes/private_003b.phpt @@ -32,7 +32,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail->not_ok() #1 {main} diff --git a/tests/classes/private_004.phpt b/tests/classes/private_004.phpt index bfecff55b9075..98f6b2a2f8f2c 100644 --- a/tests/classes/private_004.phpt +++ b/tests/classes/private_004.phpt @@ -27,7 +27,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_004b.phpt b/tests/classes/private_004b.phpt index 302c617a5f734..27d5ee6b14fd9 100644 --- a/tests/classes/private_004b.phpt +++ b/tests/classes/private_004b.phpt @@ -30,7 +30,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail->do_show() #1 {main} diff --git a/tests/classes/private_005.phpt b/tests/classes/private_005.phpt index 1fb0e3e9fae3a..5b8410c3d5c48 100644 --- a/tests/classes/private_005.phpt +++ b/tests/classes/private_005.phpt @@ -27,7 +27,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call show() -Fatal error: Uncaught Error: Call to private method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to private method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail::do_show() #1 {main} diff --git a/tests/classes/private_redeclare.phpt b/tests/classes/private_redeclare.phpt index cee59985c18cf..da3d99447b1e0 100644 --- a/tests/classes/private_redeclare.phpt +++ b/tests/classes/private_redeclare.phpt @@ -35,7 +35,7 @@ test derived base -Fatal error: Uncaught Error: Call to private method base::show() from context 'derived' in %s:%d +Fatal error: Uncaught Error: Call to private method base::show() from scope derived in %s:%d Stack trace: #0 %s(%d): derived->test() #1 {main} diff --git a/tests/classes/protected_001.phpt b/tests/classes/protected_001.phpt index 026a0f424b5e2..dd20378117d00 100644 --- a/tests/classes/protected_001.phpt +++ b/tests/classes/protected_001.phpt @@ -21,7 +21,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::fail() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_001b.phpt b/tests/classes/protected_001b.phpt index 971436c844b48..a77fc2dedf252 100644 --- a/tests/classes/protected_001b.phpt +++ b/tests/classes/protected_001b.phpt @@ -22,7 +22,7 @@ echo "Done\n"; // shouldn't be displayed --EXPECTF-- Call fail() -Fatal error: Uncaught Error: Call to protected method pass::fail() from context '' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::fail() from global scope in %s:%d Stack trace: #0 {main} thrown in %s on line %d diff --git a/tests/classes/protected_002.phpt b/tests/classes/protected_002.phpt index f3ddc15db9e95..13f01cedbb28d 100644 --- a/tests/classes/protected_002.phpt +++ b/tests/classes/protected_002.phpt @@ -30,7 +30,7 @@ echo "Done\n"; // shouldn't be displayed Call pass::show() Call fail::show() -Fatal error: Uncaught Error: Call to protected method pass::show() from context 'fail' in %s:%d +Fatal error: Uncaught Error: Call to protected method pass::show() from scope fail in %s:%d Stack trace: #0 %s(%d): fail::show() #1 {main} diff --git a/tests/classes/static_properties_undeclared_assign.phpt b/tests/classes/static_properties_undeclared_assign.phpt index e2e483516597d..3494fbd917f3d 100644 --- a/tests/classes/static_properties_undeclared_assign.phpt +++ b/tests/classes/static_properties_undeclared_assign.phpt @@ -6,7 +6,7 @@ Class C {} C::$p = 1; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property C::$p in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignInc.phpt b/tests/classes/static_properties_undeclared_assignInc.phpt index 17577863b19ae..e8f9f397801b2 100644 --- a/tests/classes/static_properties_undeclared_assignInc.phpt +++ b/tests/classes/static_properties_undeclared_assignInc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p += 1; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property C::$p in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_assignRef.phpt b/tests/classes/static_properties_undeclared_assignRef.phpt index 680aeaf2e849e..97135ceb80f59 100644 --- a/tests/classes/static_properties_undeclared_assignRef.phpt +++ b/tests/classes/static_properties_undeclared_assignRef.phpt @@ -7,7 +7,7 @@ $a = 'foo'; C::$p =& $a; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:4 +Fatal error: Uncaught Error: Access to undeclared static property C::$p in %s:%d Stack trace: #0 {main} thrown in %s on line 4 diff --git a/tests/classes/static_properties_undeclared_inc.phpt b/tests/classes/static_properties_undeclared_inc.phpt index 86b0949627694..ac02ee2e5d662 100644 --- a/tests/classes/static_properties_undeclared_inc.phpt +++ b/tests/classes/static_properties_undeclared_inc.phpt @@ -6,7 +6,7 @@ Class C {} C::$p++; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property C::$p in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/classes/static_properties_undeclared_read.phpt b/tests/classes/static_properties_undeclared_read.phpt index 7028386c69e25..1ab2112f11a9a 100644 --- a/tests/classes/static_properties_undeclared_read.phpt +++ b/tests/classes/static_properties_undeclared_read.phpt @@ -6,7 +6,7 @@ Class C {} echo C::$p; ?> --EXPECTF-- -Fatal error: Uncaught Error: Access to undeclared static property: C::$p in %s:3 +Fatal error: Uncaught Error: Access to undeclared static property C::$p in %s:%d Stack trace: #0 {main} thrown in %s on line 3 diff --git a/tests/lang/041.phpt b/tests/lang/041.phpt index 1540243cbe445..ea973f105683f 100644 --- a/tests/lang/041.phpt +++ b/tests/lang/041.phpt @@ -17,7 +17,7 @@ echo $wrongClassname::$b."\n"; --EXPECTF-- foo -Fatal error: Uncaught Error: Class 'B' not found in %s041.php:%d +Fatal error: Uncaught Error: Class "B" not found in %s:%d Stack trace: #0 {main} thrown in %s041.php on line %d diff --git a/tests/lang/042.phpt b/tests/lang/042.phpt index e9e95c8cc1fa8..a06767eb18929 100644 --- a/tests/lang/042.phpt +++ b/tests/lang/042.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::B."\n"; --EXPECTF-- foo -Fatal error: Uncaught Error: Class 'B' not found in %s042.php:%d +Fatal error: Uncaught Error: Class "B" not found in %s:%d Stack trace: #0 {main} thrown in %s042.php on line %d diff --git a/tests/lang/043.phpt b/tests/lang/043.phpt index 80c427c8a9f8a..0e7fedd45c944 100644 --- a/tests/lang/043.phpt +++ b/tests/lang/043.phpt @@ -16,7 +16,7 @@ echo $wrongClassname::foo()."\n"; --EXPECTF-- foo -Fatal error: Uncaught Error: Class 'B' not found in %s043.php:%d +Fatal error: Uncaught Error: Class "B" not found in %s:%d Stack trace: #0 {main} thrown in %s043.php on line %d diff --git a/tests/lang/044.phpt b/tests/lang/044.phpt index eef85c206f417..29d8a33e4e204 100644 --- a/tests/lang/044.phpt +++ b/tests/lang/044.phpt @@ -18,7 +18,7 @@ echo $wrongClassname::$methodname()."\n"; --EXPECTF-- foo -Fatal error: Uncaught Error: Class 'B' not found in %s044.php:%d +Fatal error: Uncaught Error: Class "B" not found in %s:%d Stack trace: #0 {main} thrown in %s044.php on line %d diff --git a/tests/lang/bug25547.phpt b/tests/lang/bug25547.phpt index 238757592e09c..53b951fd4543f 100644 --- a/tests/lang/bug25547.phpt +++ b/tests/lang/bug25547.phpt @@ -22,7 +22,7 @@ print_r($output); echo "Done"; ?> --EXPECT-- -handler(Undefined index: foo) +handler(Undefined array key "foo") Array ( [foo] => 1 diff --git a/tests/lang/bug29566.phpt b/tests/lang/bug29566.phpt index 0e6d45158b533..c80d1af28f938 100644 --- a/tests/lang/bug29566.phpt +++ b/tests/lang/bug29566.phpt @@ -11,6 +11,6 @@ foreach($var['nosuchkey'] as $v) { } ?> --EXPECTF-- -Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d +Warning: Illegal string offset "nosuchkey" in %s on line %d Warning: foreach() argument must be of type array|object, string given in %sbug29566.php on line %d diff --git a/tests/lang/bug44827.phpt b/tests/lang/bug44827.phpt index 9cb8c132e7847..60ce81a4cee8d 100644 --- a/tests/lang/bug44827.phpt +++ b/tests/lang/bug44827.phpt @@ -16,4 +16,4 @@ try { --EXPECTF-- Warning: Class constants cannot be defined or redefined in %s on line %d -Fatal error: Class '' not found in %s on line %d +Fatal error: Class "" not found in %s on line %d diff --git a/tests/lang/engine_assignExecutionOrder_002.phpt b/tests/lang/engine_assignExecutionOrder_002.phpt index a8ab0beb10763..f9f418d12e2ce 100644 --- a/tests/lang/engine_assignExecutionOrder_002.phpt +++ b/tests/lang/engine_assignExecutionOrder_002.phpt @@ -119,12 +119,12 @@ L=100 M=200 N=300 O= and P= 10 20 40 50 60 70 80 -Notice: Undefined offset: 0 in %s on line %d +Notice: Undefined array key 0 in %s on line %d -Notice: Undefined offset: 1 in %s on line %d +Notice: Undefined array key 1 in %s on line %d Y=,Z= -Notice: Undefined offset: 1 in %s on line %d +Notice: Undefined array key 1 in %s on line %d AA=10 CC=10 DD=30 Array diff --git a/tests/lang/foreachLoopIterator.001.phpt b/tests/lang/foreachLoopIterator.001.phpt index 88254558ca7fb..5293ef9d21536 100644 --- a/tests/lang/foreachLoopIterator.001.phpt +++ b/tests/lang/foreachLoopIterator.001.phpt @@ -128,5 +128,5 @@ meal 0 => breakfast --> MealIterator::valid (3) --> MealIterator::next (3) -Notice: Undefined offset: 3 in %s on line %d +Notice: Undefined array key 3 in %s on line %d --> MealIterator::valid (4) diff --git a/tests/output/ob_011.phpt b/tests/output/ob_011.phpt index cd48cc38807c5..f188071939c74 100644 --- a/tests/output/ob_011.phpt +++ b/tests/output/ob_011.phpt @@ -1,5 +1,11 @@ --TEST-- output buffering - fatalism +--SKIPIF-- + --FILE-- --EXPECTF-- -Warning: ob_start(): class 'nonExistent' not found in %s on line %d +Warning: ob_start(): class "nonExistent" not found in %s on line %d Notice: ob_start(): Failed to create buffer in %s on line %d bool(false) -Warning: ob_start(): class 'C' does not have a method 'nonExistent' in %s on line %d +Warning: ob_start(): class C does not have a method "nonExistent" in %s on line %d Notice: ob_start(): Failed to create buffer in %s on line 13 bool(false) -Warning: ob_start(): class 'C' does not have a method 'no' in %s on line %d +Warning: ob_start(): class C does not have a method "no" in %s on line %d Notice: ob_start(): Failed to create buffer in %s on line 14 bool(false) -Warning: ob_start(): function 'no' not found or invalid function name in %s on line %d +Warning: ob_start(): function "no" not found or invalid function name in %s on line %d Notice: ob_start(): Failed to create buffer in %s on line 15 bool(false) diff --git a/tests/output/ob_start_error_004.phpt b/tests/output/ob_start_error_004.phpt index 003c61d1fd8c0..c549292e88f71 100644 --- a/tests/output/ob_start_error_004.phpt +++ b/tests/output/ob_start_error_004.phpt @@ -14,7 +14,7 @@ var_dump(ob_start(array($c, 'f'))); echo "done" ?> --EXPECTF-- -Warning: ob_start(): class 'C' does not have a method 'f' in %s on line %d +Warning: ob_start(): class C does not have a method "f" in %s on line %d Notice: ob_start(): Failed to create buffer in %s on line %d bool(false) diff --git a/tests/strings/offsets_chaining_5.phpt b/tests/strings/offsets_chaining_5.phpt index 1c9da47af311c..42cb1f272187d 100644 --- a/tests/strings/offsets_chaining_5.phpt +++ b/tests/strings/offsets_chaining_5.phpt @@ -15,11 +15,11 @@ bool(true) string(6) "foobar" bool(false) -Warning: Illegal string offset 'foo' in %soffsets_chaining_5.php on line %d +Warning: Illegal string offset "foo" in %s on line %d string(1) "f" bool(false) -Warning: Illegal string offset 'foo' in %soffsets_chaining_5.php on line %d +Warning: Illegal string offset "foo" in %s on line %d -Warning: Illegal string offset 'bar' in %soffsets_chaining_5.php on line %d +Warning: Illegal string offset "bar" in %s on line %d string(1) "f" diff --git a/tests/strings/offsets_general.phpt b/tests/strings/offsets_general.phpt index 7bbe9618d5b0a..64d51457d770b 100644 --- a/tests/strings/offsets_general.phpt +++ b/tests/strings/offsets_general.phpt @@ -20,6 +20,6 @@ string(1) "o" bool(true) bool(true) -Warning: Illegal string offset 'foo' in %s line %d +Warning: Illegal string offset "foo" in %s on line %d string(1) "f" bool(false) diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 2f2c01e47dc46..e71757748fdaa 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2026,9 +2026,6 @@ function generate_tmp_php_ini() var directive = (extensions_enabled[i][2] ? 'zend_extension' : 'extension'); var ext_name = extensions_enabled[i][0]; - if ("gd" == ext_name) { - ext_name = "gd2"; - } if (!is_on_exclude_list_for_test_ini(ext_list, ext_name)) { INI.WriteLine(directive + "=php_" + ext_name + ".dll");