Annotation of embedaddon/php/ext/spl/tests/SplObjectStorage_unserialize_nested.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: SPL: 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);
                     16: echo $s."\n";
                     17: 
                     18: $so1 = unserialize($s);
                     19: var_dump($so1);
                     20: 
                     21: --EXPECTF--
1.1.1.2 ! misho      22: C:16:"SplObjectStorage":76:{x:i:2;O:8:"stdClass":1:{s:1:"a";O:8:"stdClass":0:{}},i:1;;r:4;,i:2;;m:a:0:{}}
1.1       misho      23: object(SplObjectStorage)#4 (1) {
                     24:   ["storage":"SplObjectStorage":private]=>
                     25:   array(2) {
                     26:     ["%s"]=>
                     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:     ["%s"]=>
                     38:     array(2) {
                     39:       ["obj"]=>
                     40:       object(stdClass)#6 (0) {
                     41:       }
                     42:       ["inf"]=>
                     43:       int(2)
                     44:     }
                     45:   }
                     46: }
                     47: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>