xref: /PHP-8.1/ext/opcache/tests/ref_range_1.phpt (revision 3f4bc94b)
1--TEST--
2Range info for references (1)
3--FILE--
4<?php
5
6function test() {
7    escape_x($x);
8    $x = 0;
9    modify_x();
10    return (int) $x;
11}
12
13function escape_x(&$x) {
14    $GLOBALS['x'] =& $x;
15}
16
17function modify_x() {
18    $GLOBALS['x']++;
19}
20
21var_dump(test());
22
23?>
24--EXPECT--
25int(1)
26