1--TEST--
2JIT ASSIGN_OBJ_OP: memory leak
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7--FILE--
8<?php
9class A {
10    public string $prop = "222";
11}
12
13class B {
14    public function __toString() {
15        global $a;
16        $a->prop .=  $a->prop . "leak";
17        return "test";
18    }
19}
20
21$a = new A;
22$prop = &$a->prop;
23$a->prop = new B;
24var_dump($a);
25?>
26--EXPECT--
27object(A)#1 (1) {
28  ["prop"]=>
29  &string(4) "test"
30}
31