diff options
Diffstat (limited to 'ext/opcache/tests/bug66251.phpt')
-rw-r--r-- | ext/opcache/tests/bug66251.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug66251.phpt b/ext/opcache/tests/bug66251.phpt new file mode 100644 index 0000000000..23a5165234 --- /dev/null +++ b/ext/opcache/tests/bug66251.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #66251 (Constants get statically bound at compile time when Optimized) +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--SKIPIF-- +<?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?> +--FILE-- +<?php +printf ("A=%s\n", getA()); +const A="hello"; +function getA() {return A;} +?> +--EXPECTF-- +Notice: Use of undefined constant A - assumed 'A' in %sbug66251.php on line 4 +A=A |