diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2004-07-05 07:53:41 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2004-07-05 07:53:41 +0000 |
commit | 8989a9678943759bbae2c611ef28365b35e332db (patch) | |
tree | 7a85f43c9c41604d902a166039e1f7549533ee07 | |
parent | 447223f48af74ce67ebb295dac3ff3e2c950fbb4 (diff) | |
download | php-git-8989a9678943759bbae2c611ef28365b35e332db.tar.gz |
- Add test for bug #28325.
-rw-r--r-- | ext/standard/tests/serialize/bug28325.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/standard/tests/serialize/bug28325.phpt b/ext/standard/tests/serialize/bug28325.phpt new file mode 100644 index 0000000000..7f2bd66371 --- /dev/null +++ b/ext/standard/tests/serialize/bug28325.phpt @@ -0,0 +1,39 @@ +--TEST-- +Bug #28325 (Problem in serialisation of circular references) +--FILE-- +<?php +class a { + public $b; +} +class b { + public $c; +} +class c { + public $d; +} +$a = new a(); +$a->b = new b(); +$a->b->c = new c(); +$a->b->c->d = $a; +var_dump(unserialize(serialize($a))); +?> +--EXPECTF-- +object(a)#%d (1) { + ["b"]=> + object(b)#%d (1) { + ["c"]=> + object(c)#%d (1) { + ["d"]=> + object(a)#%d (1) { + ["b"]=> + object(b)#%d (1) { + ["c"]=> + object(c)#%d (1) { + ["d"]=> + *RECURSION* + } + } + } + } + } +} |