3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $oi = 1/ class Teste { public function getClassNamePHP5() { return self::class; } public function getClassNamePHP() { return __CLASS__; } } $t = new Teste(); var_dump( $t->getClassNamePHP5() ); var_dump( $t->getClassNamePHP() );
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/QqqEH on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CLASS in /in/QqqEH on line 5
Process exited with code 255.