xref: /PHP-8.2/ext/opcache/tests/opt/sccp_018.phpt (revision e9f783fc)
1--TEST--
2SCCP 018: Object assignment
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7;opcache.opt_debug_level=0x20000
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function foo() {
13    $a = new stdClass;
14    $b = $a;
15    $a->x = 5;
16    $b->x = 42;
17    echo $a->x;
18    echo "\n";
19}
20foo();
21?>
22--EXPECT--
2342
24