]> granicus.if.org Git - php/commitdiff
New test
authorFelipe Pena <felipe@php.net>
Wed, 12 Mar 2008 13:31:38 +0000 (13:31 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 12 Mar 2008 13:31:38 +0000 (13:31 +0000)
Zend/tests/objects_020.phpt [new file with mode: 0644]

diff --git a/Zend/tests/objects_020.phpt b/Zend/tests/objects_020.phpt
new file mode 100644 (file)
index 0000000..b7c709f
--- /dev/null
@@ -0,0 +1,33 @@
+--TEST--
+Accessing members of standard object through of variable variable
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$test = 'stdclass';
+
+$$test->a =& $$test;
+$$test->a->b[] = 2;
+
+var_dump($$test);
+
+?>
+--EXPECT--
+object(stdClass)#1 (2) {
+  ["a"]=>
+  &object(stdClass)#1 (2) {
+    ["a"]=>
+    *RECURSION*
+    ["b"]=>
+    array(1) {
+      [0]=>
+      int(2)
+    }
+  }
+  ["b"]=>
+  array(1) {
+    [0]=>
+    int(2)
+  }
+}