Annotation of embedaddon/php/Zend/tests/objects_019.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing references of dynamic properties
! 3: --FILE--
! 4: <?php
! 5:
! 6: error_reporting(E_ALL);
! 7:
! 8: $foo = array(new stdclass, new stdclass);
! 9:
! 10: $foo[1]->a = &$foo[0]->a;
! 11: $foo[0]->a = 2;
! 12:
! 13: $x = $foo[1]->a;
! 14: $x = 'foo';
! 15:
! 16: var_dump($foo, $x);
! 17:
! 18: ?>
! 19: --EXPECT--
! 20: array(2) {
! 21: [0]=>
! 22: object(stdClass)#1 (1) {
! 23: ["a"]=>
! 24: &int(2)
! 25: }
! 26: [1]=>
! 27: object(stdClass)#2 (1) {
! 28: ["a"]=>
! 29: &int(2)
! 30: }
! 31: }
! 32: string(3) "foo"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>