summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2004-07-05 07:53:41 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2004-07-05 07:53:41 +0000
commit8989a9678943759bbae2c611ef28365b35e332db (patch)
tree7a85f43c9c41604d902a166039e1f7549533ee07
parent447223f48af74ce67ebb295dac3ff3e2c950fbb4 (diff)
downloadphp-git-8989a9678943759bbae2c611ef28365b35e332db.tar.gz
- Add test for bug #28325.
-rw-r--r--ext/standard/tests/serialize/bug28325.phpt39
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*
+ }
+ }
+ }
+ }
+ }
+}