3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Person { const NAME = 'Joseph'; } function getPerson() { return new Person(); } echo getPerson()::NAME;
based on h24OZ
Output for 7.0.0 - 7.2.0
Joseph
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM), expecting ',' or ';' in /in/SVJ4k on line 11
Process exited with code 255.