3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($bar) {} $rf = new ReflectionFunction('foo'); $ps = $rf->getParameters(); $p = $ps[0]; var_dump((string) $p);
based on TOCpX
Output for 5.2.0 - 7.1.0
string(32) "Parameter #0 [ <required> $bar ]"
Output for 5.0.0 - 5.1.6
string(12) "Object id #2"
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/0Dr1F on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/0Dr1F on line 5