1--TEST--
2SPL: Test unserializing tested & linked storage
3--FILE--
4<?php
5$o = new StdClass();
6$a = new StdClass();
7
8$o->a = $a;
9
10$so = new SplObjectStorage();
11
12$so[$o] = 1;
13$so[$a] = 2;
14
15$s = serialize($so);
16echo $s."\n";
17
18$so1 = unserialize($s);
19var_dump($so1);
20?>
21--EXPECT--
22O:16:"SplObjectStorage":2:{i:0;a:4:{i:0;O:8:"stdClass":1:{s:1:"a";O:8:"stdClass":0:{}}i:1;i:1;i:2;r:4;i:3;i:2;}i:1;a:0:{}}
23object(SplObjectStorage)#4 (1) {
24  ["storage":"SplObjectStorage":private]=>
25  array(2) {
26    [0]=>
27    array(2) {
28      ["obj"]=>
29      object(stdClass)#5 (1) {
30        ["a"]=>
31        object(stdClass)#6 (0) {
32        }
33      }
34      ["inf"]=>
35      int(1)
36    }
37    [1]=>
38    array(2) {
39      ["obj"]=>
40      object(stdClass)#6 (0) {
41      }
42      ["inf"]=>
43      int(2)
44    }
45  }
46}
47