3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $n = new class extends stdClass {}; echo get_class($n);
Output for 7.2.0
class@anonymous/in/mROTt0x7f960c82d028
Output for 7.1.10
class@anonymous/in/mROTt0x7f260500b028
Output for 7.1.7
class@anonymous/in/mROTt0x7ff68d700028
Output for 7.1.6
class@anonymous/in/mROTt0x7f415833d028
Output for 7.1.5
class@anonymous/in/mROTt0x7f5cb2d63028
Output for 7.1.0
class@anonymous/in/mROTt0x7f33b3f0a028
Output for 7.0.20
class@anonymous/in/mROTt0x7fe6099b3028
Output for 7.0.6
class@anonymous/in/mROTt0x7f7455f65028
Output for 7.0.5
class@anonymous/in/mROTt0x7f5308af8028
Output for 7.0.4
class@anonymous/in/mROTt0x7f818e877028
Output for 7.0.3
class@anonymous/in/mROTt0x7fe98e2a6028
Output for 7.0.2
class@anonymous/in/mROTt0x7f95db1a6028
Output for 7.0.1
class@anonymous/in/mROTt0x7fae53741028
Output for 7.0.0
class@anonymous/in/mROTt0x7fa7d8894028
Output for 5.4.0 - 5.6.28
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/mROTt on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_CLASS in /in/mROTt on line 3
Process exited with code 255.