1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/opcache/tests/ref_range_2.phpt
Dmitry Stogov 7368d0c418 Fixed bug #81096: Inconsistent range inferece for variables passed by reference
Detect references before range inference and exclude them from range
inference.
2021-06-10 11:43:15 +03:00

26 lines
300 B
PHP

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