3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo get_class(new class { public function __construct() { echo '>' . self::class . '<' . PHP_EOL; } });
Output for 7.2.0
>class@anonymous/in/jKka70x7f8b96552083< class@anonymous/in/jKka70x7f8b96552083
Output for 7.1.10
>class@anonymous/in/jKka70x7f4d8d477083< class@anonymous/in/jKka70x7f4d8d477083
Output for 7.1.7
>class@anonymous/in/jKka70x7f2d420eb083< class@anonymous/in/jKka70x7f2d420eb083
Output for 7.1.6
>class@anonymous/in/jKka70x7f69c4dd4083< class@anonymous/in/jKka70x7f69c4dd4083
Output for 7.1.5
>class@anonymous/in/jKka70x7fc959e99083< class@anonymous/in/jKka70x7fc959e99083
Output for 7.1.0
>class@anonymous/in/jKka70x7f44e156a083< class@anonymous/in/jKka70x7f44e156a083
Output for 7.0.20
>class@anonymous/in/jKka70x7f9bc8a49083< class@anonymous/in/jKka70x7f9bc8a49083
Output for 7.0.6
>class@anonymous/in/jKka70x7ff2eebfc083< class@anonymous/in/jKka70x7ff2eebfc083
Output for 7.0.5
>class@anonymous/in/jKka70x7fcaa1529083< class@anonymous/in/jKka70x7fcaa1529083
Output for 7.0.4
>class@anonymous/in/jKka70x7f817a684083< class@anonymous/in/jKka70x7f817a684083
Output for 7.0.3
>class@anonymous/in/jKka70x7fb677f86083< class@anonymous/in/jKka70x7fb677f86083
Output for 7.0.2
>class@anonymous/in/jKka70x7f04a7513083< class@anonymous/in/jKka70x7f04a7513083
Output for 7.0.1
>class@anonymous/in/jKka70x7fe53742c083< class@anonymous/in/jKka70x7fe53742c083
Output for 7.0.0
>class@anonymous/in/jKka70x7f8bc68c3083< class@anonymous/in/jKka70x7f8bc68c3083
Output for 5.4.0 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/jKka7 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/jKka7 on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /in/jKka7 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /in/jKka7 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'$'' in /in/jKka7 on line 3
Process exited with code 255.