xref: /PHP-7.3/ext/opcache/tests/bug66251.phpt (revision 1b565f13)
1--TEST--
2Bug #66251 (Constants get statically bound at compile time when Optimized)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?>
9--FILE--
10<?php
11printf ("A=%s\n", getA());
12const A="hello";
13function getA() {return A;}
14?>
15--EXPECTF--
16Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in %sbug66251.php on line 4
17A=A
18