traits
in the same class, the traits must not have the same method declaredtrait Laser {
public function who() {
echo 'I am a Laser' . PHP_EOL;
}
}
trait Projector {
public function who() {
echo 'I am a Laser' . PHP_EOL;
}
}
class Galaxy {
use Laser;//, Projector;
use Projector;
}
Fatal error: Trait method who has not been applied, because there are collisions with other trait methods on Galaxy