3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo { class Bar { } } namespace Internal { print (new ReflectionClass('Foo\Bar'))->getShortName(); // for namespaces, if any }
based on 4ZsQN
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Class 'Internal\ReflectionClass' not found in /in/lDsU0:8 Stack trace: #0 {main} thrown in /in/lDsU0 on line 8
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Fatal error: Class 'Internal\ReflectionClass' not found in /in/lDsU0 on line 8
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/lDsU0 on line 8
Process exited with code 255.