Open
Description
Description
The following code:
<?php
trait A {
public function test() {
return 'A';
}
}
trait B {
public function test() {
return 'B';
}
}
class C {
use A, B {
A::test insteadof B;
B::test insteadof A;
}
}
$c = new C();
var_dump($c->test());
Resulted in this output:
Fatal error: Uncaught Error: Call to undefined method C::test()
But I expected this output instead:
Some trait-resolution-time error
PHP Version
PHP-5.4+
Operating System
No response