Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Multiple Traits
class Animal {
public function roar() {
echo "Makes animal sounds";
trait Cat {
public function roar() {
echo "Meowww";
trait BigCat {
public function kill() {
echo "Kill an animal";
class Tiger extends Animal {
use Cat;
use BigCat;
$tiger = new Tiger;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.