1--TEST--
2Self-referencing map entry GC - 010
3--FILE--
4<?php
5
6class Value {
7    function __construct() {
8    }
9}
10
11function possibleRoot($value) {
12}
13
14$map = new WeakMap();
15
16$obj = new stdClass();
17possibleRoot($obj);
18
19$obj2 = new Value();
20$map[$obj2] = [$obj2, $map];
21
22$obj = null;
23
24$obj3 = new class {};
25$map[$obj3] = $obj3;
26unset($obj3);
27
28gc_collect_cycles();
29?>
30==DONE==
31--EXPECT--
32==DONE==
33