mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
21 lines
300 B
Plaintext
21 lines
300 B
Plaintext
|
--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
|