3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php> trait Hello { function sayHello() { return "Hello"; } } trait World { function sayWorld() { return "World"; } } class MyWorld { use Hello, World; } $world = new MyWorld(); echo $world->sayHello() . " " . $world->sayWorld(); <?>
Output for 5.3.0 - 5.4.32
<?php> trait Hello { function sayHello() { return "Hello"; } } trait World { function sayWorld() { return "World"; } } class MyWorld { use Hello, World; } $world = new MyWorld(); echo $world->sayHello() . " " . $world->sayWorld(); <?>