diff options
author | Felipe Pena <felipe@php.net> | 2008-03-12 12:58:12 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-03-12 12:58:12 +0000 |
commit | 5fa8f63a01fd6cc72c90dd50b7660505fbcce327 (patch) | |
tree | a3087e4b5fcb9bb3cb0bdb76ea0eae06b7c6de02 /Zend/tests/objects_019.phpt | |
parent | d269b5fd50837edaf3db9a1442f3ae27b8f9d00e (diff) | |
download | php-git-5fa8f63a01fd6cc72c90dd50b7660505fbcce327.tar.gz |
New tests
Diffstat (limited to 'Zend/tests/objects_019.phpt')
-rw-r--r-- | Zend/tests/objects_019.phpt | 32 |
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" |