cvs: ZendEngine2 /tests objects_020.phpt

[email protected] ("Felipe Pena")
Newsgroups php.zend-engine.cvs
Message-ID <cvsfelipe1205328747@cvsserver>
felipe		Wed Mar 12 13:32:27 2008 UTC

  Modified files:              
    /ZendEngine2/tests	objects_020.phpt 
  Log:
  New test
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/objects_020.phpt?r1=1.1&r2=1.2&diff_format=u
Index: ZendEngine2/tests/objects_020.phpt
diff -u /dev/null ZendEngine2/tests/objects_020.phpt:1.2
--- /dev/null	Wed Mar 12 13:32:27 2008
+++ ZendEngine2/tests/objects_020.phpt	Wed Mar 12 13:32:27 2008
@@ -0,0 +1,51 @@
+--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)
+  }
+}
+--UEXPECT--
+object(stdClass)#1 (2) {
+  [u"a"]=>
+  &object(stdClass)#1 (2) {
+    [u"a"]=>
+    *RECURSION*
+    [u"b"]=>
+    array(1) {
+      [0]=>
+      int(2)
+    }
+  }
+  [u"b"]=>
+  array(1) {
+    [0]=>
+    int(2)
+  }
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.