summaryrefslogtreecommitdiff
path: root/Zend/tests/clone_004.phpt
blob: 984313ce7448e4a10df2bffdeb2ac50b506307d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Testing usage of object as array on clone statement
--FILE--
<?php 

error_reporting(E_ALL|E_STRICT);

class foo {
	public function __get($a) {
		return new $this;
	}
}

$c = new foo;

$a = clone $c->b[1];

?>
--EXPECTF--
Fatal error: Cannot use object of type foo as array in %s on line %d