3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $refFunc = new ReflectionFunction('preg_replace'); foreach( $refFunc->getParameters() as $param ){ print $param; } ?>
Output for 5.3.1 - 5.6.28, 7.0.0 - 7.1.0
Parameter #0 [ <required> $regex ]Parameter #1 [ <required> $replace ]Parameter #2 [ <required> $subject ]Parameter #3 [ <optional> $limit ]Parameter #4 [ <optional> &$count ]
Output for hhvm-3.10.0 - 3.12.0
Parameter #0 [ <required> HH\mixed $pattern ]Parameter #1 [ <required> HH\mixed $replacement ]Parameter #2 [ <required> HH\mixed $subject ]Parameter #3 [ <optional> HH\int $limit = -1 ]Parameter #4 [ <optional> ?HH\int or NULL &$count = NULL ]
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