3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function first(){ } function second(){ } } $foo = new Foo(); $reflect = new ReflectionClass($foo); $props = $reflect->getMethods(); foreach ($props as $prop) { print $prop . "\n"; }
Output for 5.2.0 - 7.1.0
Method [ <user> public method first ] { @@ /in/sXoSm 4 - 6 } Method [ <user> public method second ] { @@ /in/sXoSm 8 - 10 }
Output for 5.0.0 - 5.1.6
Object id #3 Object id #4
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/sXoSm on line 15
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/sXoSm on line 15