1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Files
archived-php-src/ext/opcache/tests/jit/bind_static_002.phpt
2024-01-15 09:39:13 +01:00

24 lines
339 B
PHP

--TEST--
Bind static deoptimization
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
--FILE--
<?php
function test($n) {
static $x = array(A);
return isset($x[$n]);
}
define("A", 42);
for ($i = 0; $i < 5; $i++) {
var_dump(test(0));
}
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)