mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
25 lines
305 B
PHP
25 lines
305 B
PHP
--TEST--
|
|
Self-referencing map entry GC - 015
|
|
--FILE--
|
|
<?php
|
|
|
|
class Value {
|
|
public function __construct() {
|
|
}
|
|
}
|
|
|
|
$map = new WeakMap();
|
|
$obj = new Value();
|
|
$map[$obj] = [$obj, $map];
|
|
$ref = WeakReference::create($map);
|
|
|
|
$map = null;
|
|
|
|
gc_collect_cycles();
|
|
|
|
var_dump($ref->get());
|
|
|
|
?>
|
|
--EXPECT--
|
|
NULL
|