3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait ExampleTrait { protected $developer; public function really() { echo 'yep'; } } class Work { protected $developer; use ExampleTrait; public function __construct() { $this->developer = 'Aaron'; echo $this->developer; } public function really() { echo 'noppers'; } } $work = new Work();
based on SUB0v
Output for 7.0.0 - 7.2.0
Aaron
Output for 5.4.1 - 5.6.28
Strict Standards: Work and ExampleTrait define the same property ($developer) in the composition of Work. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in /in/cDWRn on line 30 Aaron
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/cDWRn on line 3
Process exited with code 255.