1--TEST--
2GH-10168: Assign static prop ref with prop ref
3--FILE--
4<?php
5
6class Test {
7    static ?Test $test;
8    static ?Test $test2;
9
10    function __destruct() {
11        Test::$test = null;
12    }
13}
14
15Test::$test = new Test;
16Test::$test2 = &Test::$test;
17$tmp = new Test;
18var_dump(Test::$test = &$tmp);
19
20?>
21--EXPECT--
22object(Test)#2 (0) {
23}
24