1--TEST--
2GH-10168: Assign static prop 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;
17var_dump(Test::$test = new Test);
18
19?>
20--EXPECT--
21object(Test)#2 (0) {
22}
23