summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/opt/sccp_029.phpt
blob: 99459f74af5bae8f4241b05f1aeb4ca31a9ba720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
SCCP 029: Don't propagate assignments to references to typed properties
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
opcache.preload=
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php

class Test {
    public string $x = "x";
}
function test() {
    $test = new Test();
    $ref = "y";
    $test->x =& $ref;
    $ref = 42;
    var_dump($ref);
}
test();

?>
--EXPECT--
string(2) "42"