1--TEST--
2WeakMap object reference offset
3--FILE--
4<?php
5
6$map = new WeakMap;
7$obj = new stdClass;
8$obj2 = &$obj;
9
10$map[$obj] = 1;
11var_dump(count($map));
12var_dump($map);
13var_dump(isset($map[$obj]));
14var_dump(!empty($map[$obj]));
15var_dump($map[$obj]);
16
17?>
18--EXPECT--
19int(1)
20object(WeakMap)#1 (1) {
21  [0]=>
22  array(2) {
23    ["key"]=>
24    object(stdClass)#2 (0) {
25    }
26    ["value"]=>
27    int(1)
28  }
29}
30bool(true)
31bool(true)
32int(1)
33