]> granicus.if.org Git - php/commitdiff
- Times have changed - php 5 relevant version now
authorMarcus Boerger <helly@php.net>
Fri, 11 Mar 2005 00:22:28 +0000 (00:22 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 11 Mar 2005 00:22:28 +0000 (00:22 +0000)
ext/standard/tests/serialize/bug31402.phpt

index be1810b8249a9ba54afce4555d9fe906e931a5bb..9db838d71760f17ed285ca1a8a21933fb5d4f562 100644 (file)
@@ -19,7 +19,8 @@ class TestY {
 
   function __construct() {
     $this->A[1] = new TestX(1);
-    $this->A[2] = new TestX(2);
+    $this->A[2] = & new TestX(2);
+    $this->A[3] = & $this->A[2];
     $this->B = $this->A[1];
   }
 }
@@ -31,17 +32,23 @@ $after = unserialize($ser);
 var_dump($before, $after);
 
 ?>
+===DONE===
 --EXPECTF--
 object(TestY)#%d (2) {
   ["A"]=>
-  array(2) {
+  array(3) {
     [1]=>
     object(TestX)#%d (1) {
       ["i"]=>
       int(1)
     }
     [2]=>
-    object(TestX)#%d (1) {
+    &object(TestX)#%d (1) {
+      ["i"]=>
+      int(2)
+    }
+    [3]=>
+    &object(TestX)#%d (1) {
       ["i"]=>
       int(2)
     }
@@ -54,21 +61,27 @@ object(TestY)#%d (2) {
 }
 object(TestY)#%d (2) {
   ["A"]=>
-  array(2) {
+  array(3) {
     [1]=>
-    &object(TestX)#%d (1) {
+    object(TestX)#%d (1) {
       ["i"]=>
       int(1)
     }
     [2]=>
-    object(TestX)#%d (1) {
+    &object(TestX)#%d (1) {
+      ["i"]=>
+      int(2)
+    }
+    [3]=>
+    &object(TestX)#%d (1) {
       ["i"]=>
       int(2)
     }
   }
   ["B"]=>
-  &object(TestX)#%d (1) {
+  object(TestX)#%d (1) {
     ["i"]=>
     int(1)
   }
 }
+===DONE===