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--EXPECTF--
21O: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:{}}
22object(SplObjectStorage)#4 (1) {
23  ["storage":"SplObjectStorage":private]=>
24  array(2) {
25    ["%s"]=>
26    array(2) {
27      ["obj"]=>
28      object(stdClass)#5 (1) {
29        ["a"]=>
30        object(stdClass)#6 (0) {
31        }
32      }
33      ["inf"]=>
34      int(1)
35    }
36    ["%s"]=>
37    array(2) {
38      ["obj"]=>
39      object(stdClass)#6 (0) {
40      }
41      ["inf"]=>
42      int(2)
43    }
44  }
45}
46