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