3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php interface ContactFieldsInterface { public function getEmail(); } trait ContactFieldsTrait { protected $email; public function getEmail() { return $this->email; } } class User { protected $email; } class Contact extends User implements ContactFieldsInterface { use ContactFieldsTrait { User::email insteadof ContactFieldsTrait::email; } }
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ';' in /in/E2aGl on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/E2aGl on line 7
Process exited with code 255.