php-8.0.30-src/ext/opcache/tests/ref_range_1.phpt

26 lines
282 B
PHP

--TEST--
Range info for references (1)
--FILE--
<?php
function test() {
escape_x($x);
$x = 0;
modify_x();
return (int) $x;
}
function escape_x(&$x) {
$GLOBALS['x'] =& $x;
}
function modify_x() {
$GLOBALS['x']++;
}
var_dump(test());
?>
--EXPECT--
int(1)