mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
22 lines
270 B
PHP
22 lines
270 B
PHP
--TEST--
|
|
GH-10168: Assign dim with prop ref
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
static ?Test $test;
|
|
|
|
function __destruct() {
|
|
$GLOBALS['a'] = null;
|
|
}
|
|
}
|
|
|
|
$a = [new Test];
|
|
Test::$test = &$a[0];
|
|
var_dump($a[0] = new Test);
|
|
|
|
?>
|
|
--EXPECT--
|
|
object(Test)#2 (0) {
|
|
}
|