xref: /PHP-8.1/ext/opcache/tests/opt/sccp_020.phpt (revision e9f783fc)
1--TEST--
2SCCP 020: 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    $b = $a = new stdClass;
14    $a->x = 5;
15    $b->x = 42;
16    echo $a->x;
17    echo "\n";
18}
19foo();
20?>
21--EXPECT--
2242
23