1--TEST--
2Reference IDs should be correctly generated when $GLOBALS is serialized
3--FILE--
4<?php
5
6$obj = new stdClass;
7$obj2 = new stdClass;
8$obj2->obj = $obj;
9$s = serialize($GLOBALS);
10$globals = unserialize($s);
11var_dump($obj);
12var_dump($obj2);
13
14?>
15--EXPECT--
16object(stdClass)#1 (0) {
17}
18object(stdClass)#2 (1) {
19  ["obj"]=>
20  object(stdClass)#1 (0) {
21  }
22}
23