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->really(); } public function really() { echo 'noppers'; } } $work = new Work();
based on cDWRn
Output for 7.0.0 - 7.2.0
noppers
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/rXbop on line 29 noppers
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/rXbop on line 3
Process exited with code 255.