mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
This issue is properly fixed by GH-7121 on master. For older branches, disable the use of range information in SCCP, to reduce impact of potentially incorrect ranges.
26 lines
282 B
PHP
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)
|