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 '$protected' (T_VARIABLE), expecting function (T_FUNCTION) in /in/KofIu on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/KofIu on line 7
Process exited with code 255.