3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface someInterface { public function wibble(); } trait someTrait { public function wibble() { echo 'wibble'; } } class someClass implements someInterface { use someTrait { wibble as private; } } $someObject = new someClass(); $someObject->wibble();
Output for 7.0.6 - 7.2.0
Fatal error: Access level to someClass::wibble() must be public (as in class someInterface) in /in/KD3TE on line 14
Process exited with code 255.
Output for 7.0.0 - 7.0.5
Fatal error: Access level to someTrait::wibble() must be public (as in class someInterface) in /in/KD3TE on line 14
Process exited with code 255.
Output for 5.5.25 - 5.5.35, 5.6.9 - 5.6.28
Fatal error: Access level to someTrait::wibble() must be public (as in class someInterface) in /in/KD3TE on line 18
Process exited with code 255.
Output for 5.4.11 - 5.5.24, 5.6.8
Fatal error: Call to private method someClass::wibble() from context '' in /in/KD3TE on line 21
Process exited with code 255.
Output for 5.4.2 - 5.4.10
Fatal error: Access level to someClass::wibble() must be public (as in class someInterface) in /in/KD3TE on line 18
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/KD3TE on line 7
Process exited with code 255.