From: Christoph M. Becker Date: Mon, 1 Jul 2019 16:12:28 +0000 (+0200) Subject: Merge branch 'PHP-7.2' into PHP-7.3 X-Git-Tag: php-7.4.0alpha3~85^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e25ddb07bbe5738b37c761ccba72cb4bf77cc16;p=php Merge branch 'PHP-7.2' into PHP-7.3 * PHP-7.2: Add missing SKIPIFs --- 3e25ddb07bbe5738b37c761ccba72cb4bf77cc16 diff --cc ext/opcache/tests/bug76337.phpt index fe3fd8d40e,07608e2660..5001942526 --- a/ext/opcache/tests/bug76337.phpt +++ b/ext/opcache/tests/bug76337.phpt @@@ -1,7 -1,7 +1,8 @@@ --TEST-- Bug 76337: segmentation fault when an extension use zend_register_class_alias() and opcache enabled --SKIPIF-- - + +--FILE-- + "a"])); +?> +--EXPECT-- +bool(true) diff --cc ext/opcache/tests/bug77275.phpt index 28f6a3036f,0000000000..d482f9e720 mode 100644,000000..100644 --- a/ext/opcache/tests/bug77275.phpt +++ b/ext/opcache/tests/bug77275.phpt @@@ -1,30 -1,0 +1,32 @@@ +--TEST-- +Bug #77275: OPcache optimization problem for ArrayAccess->offsetGet(string) +--INI-- +opcache.enable_cli=1 +opcache.optimization_level=-1 ++--SKIPIF-- ++ +--FILE-- +get('a', 'b', 'c'); + $rec = new Record(); + $id = $rec['a']; + } +} +(new Baz())->run(); +?> +--EXPECT-- +string(1) "a" diff --cc ext/opcache/tests/bug77310_1.phpt index f7baec7fb8,0000000000..a9af4bffba mode 100644,000000..100644 --- a/ext/opcache/tests/bug77310_1.phpt +++ b/ext/opcache/tests/bug77310_1.phpt @@@ -1,19 -1,0 +1,21 @@@ +--TEST-- +Bug #77310 (1): Incorrect SCCP for compound assign to arrays ++--SKIPIF-- ++ +--FILE-- + +--EXPECT-- +zeroonetwo diff --cc ext/opcache/tests/bug78015.phpt index b2ecceacde,0000000000..0a03c9834f mode 100644,000000..100644 --- a/ext/opcache/tests/bug78015.phpt +++ b/ext/opcache/tests/bug78015.phpt @@@ -1,113 -1,0 +1,115 @@@ +--TEST-- +Bug #78015: Incorrect evaluation of expressions involving partials array in SCCP ++--SKIPIF-- ++ +--FILE-- + [$x], 'c' => [$x]]; + $d = $a['b'] + $a['c']; + return $d; +} + +function test2() { + global $x; + $a = ['b' => [$x]]; + $d = !$a['b']; + return $d; +} + +function test3() { + global $x; + $a = ['b' => [$x]]; + $d = (int) $a['b']; + return $d; +} + +function test4() { + global $x; + $a = ['b' => [$x]]; + $d = $a['b'] ?: 42; + return $d; +} + +function test5() { + global $x; + $a = ['b' => [$x]]; + $d = is_array($a['b']); + return $d; +} + +function test6() { + global $x; + $a = ['b' => [$x]]; + $b = "foo"; + $d = "$a[b]{$b}bar"; + return $d; +} + +function test7() { + global $x; + $a = ['b' => [$x]]; + $y = 1; + foreach ($a['b'] as $_) { + $y = 2; + } + return $y; +} + +function test8($array) { + $i = 0; + $ret = [[]]; + foreach ($array as $_) { + $i++; + $ret = [[ + 'x' => 0, + 'y' => $i, + ]]; + } + return $ret[0]; +} + +function test9() { + global $x; + $a = ['b' => [$x]]; + return serialize($a['b']); +} + +var_dump(test1()); +var_dump(test2()); +var_dump(test3()); +var_dump(test4()); +var_dump(test5()); +var_dump(test6()); +var_dump(test7()); +var_dump(test8([1])); +var_dump(test9()); + +?> +--EXPECTF-- +array(1) { + [0]=> + int(1) +} +bool(false) +int(1) +array(1) { + [0]=> + int(1) +} +bool(true) + +Notice: Array to string conversion in %s on line %d +string(11) "Arrayfoobar" +int(2) +array(2) { + ["x"]=> + int(0) + ["y"]=> + int(1) +} +string(14) "a:1:{i:0;i:1;}" diff --cc ext/opcache/tests/invalid_new_dce.phpt index 8f44b80f10,0000000000..c029a49bdc mode 100644,000000..100644 --- a/ext/opcache/tests/invalid_new_dce.phpt +++ b/ext/opcache/tests/invalid_new_dce.phpt @@@ -1,40 -1,0 +1,42 @@@ +--TEST-- +Throwings NEWs should not be DCEd +--INI-- +opcache.enable_cli=1 +opcache.optimization_level=-1 ++--SKIPIF-- ++ +--FILE-- +getMessage(), "\n"; } +try { test2(); } catch (Error $e) { echo $e->getMessage(), "\n"; } +try { test3(); } catch (Error $e) { echo $e->getMessage(), "\n"; } +try { test4(); } catch (Error $e) { echo $e->getMessage(), "\n"; } + +?> +--EXPECT-- +Cannot instantiate abstract class Foo +Cannot instantiate interface Bar +Cannot instantiate trait Baz +Cannot declare self-referencing constant 'Abc::BAR' diff --cc ext/opcache/tests/jmp_elim_004.phpt index f4053d9616,0000000000..8834ab4e85 mode 100644,000000..100644 --- a/ext/opcache/tests/jmp_elim_004.phpt +++ b/ext/opcache/tests/jmp_elim_004.phpt @@@ -1,24 -1,0 +1,26 @@@ +--TEST-- +Incorrect empty basic block elimination +--INI-- +opcache.enable_cli=1 +opcache.optimization_level=-1 ++--SKIPIF-- ++ +--FILE-- + +--EXPECT-- +string(4) "test" +int(3) +object(stdClass)#1 (0) { +} diff --cc ext/opcache/tests/ssa_bug_011.phpt index 3c12777724,0000000000..c25e9c46ab mode 100644,000000..100644 --- a/ext/opcache/tests/ssa_bug_011.phpt +++ b/ext/opcache/tests/ssa_bug_011.phpt @@@ -1,15 -1,0 +1,17 @@@ +--TEST-- +Wrong assertion ++--SKIPIF-- ++ +--FILE-- + +OK +--EXPECT-- +OK