xref: /PHP-8.2/ext/opcache/tests/opt/sccp_029.phpt (revision e9f783fc)
1--TEST--
2SCCP 029: Don't propagate assignments to references to typed properties
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.preload=
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12
13class Test {
14    public string $x = "x";
15}
16function test() {
17    $test = new Test();
18    $ref = "y";
19    $test->x =& $ref;
20    $ref = 42;
21    var_dump($ref);
22}
23test();
24
25?>
26--EXPECT--
27string(2) "42"
28