Annotation of embedaddon/php/Zend/tests/clone_004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Testing usage of object as array on clone statement
! 3: --FILE--
! 4: <?php
! 5:
! 6: error_reporting(E_ALL|E_STRICT);
! 7:
! 8: class foo {
! 9: public function __get($a) {
! 10: return new $this;
! 11: }
! 12: }
! 13:
! 14: $c = new foo;
! 15:
! 16: $a = clone $c->b[1];
! 17:
! 18: ?>
! 19: --EXPECTF--
! 20: Fatal error: Cannot use object of type foo as array in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>