moriyoshi               Mon Jul  5 03:53:43 2004 EDT

  Added files:                 
    /php-src/ext/standard/tests/serialize       bug28325.phpt 
  Log:
  - Add test for bug #28325.
  
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/serialize/bug28325.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/serialize/bug28325.phpt
+++ php-src/ext/standard/tests/serialize/bug28325.phpt
--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*
          }
        }
      }
    }
  }
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to