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