mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
1a3bdb4a2c
run-tests.php enforces error_reporting=E_ALL (including E_STRICT), setting this explicitly in not necessary. Conversely, after the removal of some E_STRICT errors, explicitly excluding it is no longer necessary in some places.
22 lines
323 B
PHP
22 lines
323 B
PHP
--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
|