<?php
trait T1 {
public static function m(){
echo "t1 trait";
}
}
trait T2 {
public static function m(){
echo "t2 trait";
}
}
class Test {
use T1, T2;
public function __construct() {
var_dump((new ReflectionClass($this))->getTraitNames());
}
}
$t = new Test();
Fatal error: Trait method m has not been applied, because there are collisions with other trait methods on Test in /in/bVpbb on line 19
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Fatal error: Trait method m has not been applied, because there are collisions with other trait methods on Test in /in/bVpbb on line 27
Process exited with code 255.