1--TEST--
2GH-10168: Assign prop ref
3--FILE--
4<?php
5
6class Box {
7    public ?Test $value;
8}
9
10class Test {
11    function __destruct() {
12        global $box;
13        $box->value = null;
14    }
15}
16
17function test($box) {
18    $tmp = new Test;
19    var_dump($box->value = &$tmp);
20}
21
22$box = new Box();
23$box->value = new Test;
24test($box);
25// Second call tests the cache slot path
26test($box);
27
28?>
29--EXPECT--
30NULL
31object(Test)#2 (0) {
32}
33