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