Annotation of embedaddon/php/ext/standard/tests/serialize/bug28325.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #28325 (Problem in serialisation of circular references)
3: --FILE--
4: <?php
5: class a {
6: public $b;
7: }
8: class b {
9: public $c;
10: }
11: class c {
12: public $d;
13: }
14: $a = new a();
15: $a->b = new b();
16: $a->b->c = new c();
17: $a->b->c->d = $a;
18: var_dump(unserialize(serialize($a)));
19: ?>
20: --EXPECTF--
21: object(a)#%d (1) {
22: ["b"]=>
23: object(b)#%d (1) {
24: ["c"]=>
25: object(c)#%d (1) {
26: ["d"]=>
27: *RECURSION*
28: }
29: }
30: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>