blob: 80c21c6ba52a28c651b2b1a727f4729d0c2a8d8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Testing usage of object as array on clone statement
--FILE--
<?php
class foo {
public function __get($a) {
return new $this;
}
}
$c = new foo;
$a = clone $c->b[1];
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot use object of type foo as array in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d
|