3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $refFunc = new ReflectionFunction('preg_replace'); foreach( $refFunc->getParameters() as $param ){ print $param; } ?>
Output for 5.3.1 - 7.2.0
Parameter #0 [ <required> $regex ]Parameter #1 [ <required> $replace ]Parameter #2 [ <required> $subject ]Parameter #3 [ <optional> $limit ]Parameter #4 [ <optional> &$count ]
Output for 5.3.0
Parameter #0 [ <required> $regex ]Parameter #1 [ <required> $replace ]Parameter #2 [ <optional> $subject ]Parameter #3 [ <optional> $limit ]Parameter #4 [ <optional> &$count ]
Output for 5.1.3 - 5.2.17
Parameter #0 [ <required> $param0 ]Parameter #1 [ <required> $param1 ]Parameter #2 [ <required> $param2 ]Parameter #3 [ <required> $param3 ]Parameter #4 [ <required> &$param4 ]
Output for 5.0.0 - 5.1.2
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/uZ0Y4 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/uZ0Y4 on line 2