mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
d9219f997d
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.
31 lines
508 B
PHP
31 lines
508 B
PHP
--TEST--
|
|
Aliasing leading to conflict should result in error message
|
|
--FILE--
|
|
<?php
|
|
error_reporting(E_ALL);
|
|
|
|
trait Hello {
|
|
public function hello() {
|
|
echo 'Hello';
|
|
}
|
|
}
|
|
|
|
trait World {
|
|
public function world() {
|
|
echo ' World!';
|
|
}
|
|
}
|
|
|
|
|
|
class MyClass {
|
|
use Hello, World { world as hello; }
|
|
}
|
|
|
|
$o = new MyClass();
|
|
$o->hello();
|
|
$o->world();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Trait method World::world has not been applied as MyClass::hello, because of collision with Hello::hello in %s on line %d
|