3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait A { public $first_var = "hello"; } class don{ use A{ A:$first_var as public $second_var; } public function dis(){ echo $this->second_var; } } $do = new don(); echo $do->dis(); ?>
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected ':', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/4UbJq on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/4UbJq on line 3
Process exited with code 255.