1--TEST--
2JIT: FETCH_OBJ 007
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7--FILE--
8<?php
9class C {
10    public ?C $prop = null;
11}
12function foo($obj) {
13    $obj->prop->prop = null;
14}
15
16$obj = new C;
17$obj->prop = new C;
18for ($i = 0; $i < 10; $i++) {
19    foo($obj);
20}
21var_dump($obj);
22?>
23--EXPECT--
24object(C)#1 (1) {
25  ["prop"]=>
26  object(C)#2 (1) {
27    ["prop"]=>
28    NULL
29  }
30}
31