diff options
Diffstat (limited to 'ext/opcache/tests/leak_001.phpt')
-rw-r--r-- | ext/opcache/tests/leak_001.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/opcache/tests/leak_001.phpt b/ext/opcache/tests/leak_001.phpt new file mode 100644 index 0000000000..c590943fcb --- /dev/null +++ b/ext/opcache/tests/leak_001.phpt @@ -0,0 +1,34 @@ +--TEST-- +Leak 001: Incorrect 'if ();' optimization +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_cache_only=0 +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +if (false); + +if (true); + +if (2 + 3); + +$x = 2; +$y = 3; +if ($x + $y); + +if ($x); + +$a = [[$x]]; +if ($a[0]); + +if (new stdClass()); + +$x = 2; +$a = [1,$x]; +if ((object)$a); +?> +OK +--EXPECT-- +OK |