If we use several
traits
in the same class, the traits must not have the same method declared
trait 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
by Valeri Tandilashvili
4 years ago
PHP
OOP
PHP official doc
2
Pro tip: use ```triple backticks around text``` to write in code fences