summaryrefslogtreecommitdiff
path: root/Zend/tests/objects_019.phpt
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-03-12 12:58:12 +0000
committerFelipe Pena <felipe@php.net>2008-03-12 12:58:12 +0000
commit5fa8f63a01fd6cc72c90dd50b7660505fbcce327 (patch)
treea3087e4b5fcb9bb3cb0bdb76ea0eae06b7c6de02 /Zend/tests/objects_019.phpt
parentd269b5fd50837edaf3db9a1442f3ae27b8f9d00e (diff)
downloadphp-git-5fa8f63a01fd6cc72c90dd50b7660505fbcce327.tar.gz
New tests
Diffstat (limited to 'Zend/tests/objects_019.phpt')
-rw-r--r--Zend/tests/objects_019.phpt32
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/tests/objects_019.phpt b/Zend/tests/objects_019.phpt
new file mode 100644
index 0000000000..53889edfab
--- /dev/null
+++ b/Zend/tests/objects_019.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Testing references of dynamic properties
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$foo = array(new stdclass, new stdclass);
+
+$foo[1]->a = &$foo[0]->a;
+$foo[0]->a = 2;
+
+$x = $foo[1]->a;
+$x = 'foo';
+
+var_dump($foo, $x);
+
+?>
+--EXPECT--
+array(2) {
+ [0]=>
+ object(stdClass)#1 (1) {
+ ["a"]=>
+ &int(2)
+ }
+ [1]=>
+ object(stdClass)#2 (1) {
+ ["a"]=>
+ &int(2)
+ }
+}
+string(3) "foo"