3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ref = new ReflectionFunction('array_unique'); var_dump($ref->getParameters()); // outputs "1" in the PHP runtime $ref = new ReflectionFunction('array_search'); var_dump(count($ref->getParameters())); // always outputs "3"
based on Tj5cj
Output for 7.0.1 - 7.2.0
array(2) { [0]=> object(ReflectionParameter)#2 (1) { ["name"]=> string(3) "arg" } [1]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(5) "flags" } } int(3)
Output for 7.0.0
array(1) { [0]=> object(ReflectionParameter)#2 (1) { ["name"]=> string(3) "arg" } } int(3)
Output for 5.6.17 - 5.6.28
array(2) { [0]=> &object(ReflectionParameter)#2 (1) { ["name"]=> string(3) "arg" } [1]=> &object(ReflectionParameter)#3 (1) { ["name"]=> string(5) "flags" } } int(3)
Output for 5.3.20 - 5.6.16
array(1) { [0]=> &object(ReflectionParameter)#2 (1) { ["name"]=> string(3) "arg" } } int(3)