mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
I don't think there is any reason to disable this anymore, at least all the messages generated in tests look correct and more useful.
29 lines
456 B
PHP
29 lines
456 B
PHP
--TEST--
|
|
Testing collision with magic methods
|
|
--FILE--
|
|
<?php
|
|
|
|
trait foo {
|
|
public function __clone() {
|
|
var_dump(__FUNCTION__);
|
|
}
|
|
}
|
|
|
|
trait baz {
|
|
public function __clone() {
|
|
var_dump(__FUNCTION__);
|
|
}
|
|
}
|
|
|
|
class bar {
|
|
use foo;
|
|
use baz;
|
|
}
|
|
|
|
$o = new bar;
|
|
var_dump(clone $o);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Trait method baz::__clone has not been applied as bar::__clone, because of collision with foo::__clone in %s on line %d
|