3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Test; class MyTest { function a() { var_dump([ '__CLASS__' => __CLASS__, 'get_class()' => get_class($this), 'reflection' => new \ReflectionClass($this)->getShortName() ]); } } $myTest = new MyTest(); $myTest->a();
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ']' in /in/PBNSR on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[', expecting ')' in /in/PBNSR on line 7
Process exited with code 255.