1--TEST--
2Object serialization / unserialization: circular object with rc=1
3--FILE--
4<?php
5$t=new stdClass;
6$t->y=$t;
7$y=(array)$t;
8unset($t);
9var_dump($y);
10$s=serialize($y);
11var_dump($s);
12$x=unserialize($s);
13var_dump($x);
14vaR_dump(serialize($x));
15?>
16--EXPECTF--
17array(1) {
18  ["y"]=>
19  object(stdClass)#%d (1) {
20    ["y"]=>
21    *RECURSION*
22  }
23}
24string(45) "a:1:{s:1:"y";O:8:"stdClass":1:{s:1:"y";r:2;}}"
25array(1) {
26  ["y"]=>
27  object(stdClass)#%d (1) {
28    ["y"]=>
29    *RECURSION*
30  }
31}
32string(45) "a:1:{s:1:"y";O:8:"stdClass":1:{s:1:"y";r:2;}}"
33