3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class a{ function b($aaaaaaaa, $aaaaaaaa) { $params = func_get_args(); }} $c = new a;$c->b('waa?', 'meukee!'); $reflectionClass = new ReflectionClass($c);$params = $reflectionClass->getMethod('b')->getParameters(); var_dump($params[0], $params[1]); ?>
based on vjcbp
Output for hhvm-3.12.0
object(ReflectionParameter)#4 (3) { ["info"]=> array(11) { ["index"]=> int(0) ["name"]=> string(9) "aaaaaaaa0" ["type"]=> string(0) "" ["type_hint"]=> string(0) "" ["type_hint_builtin"]=> bool(false) ["function"]=> string(1) "b" ["class"]=> string(1) "a" ["nullable"]=> bool(true) ["type_hint_nullable"]=> bool(true) ["attributes"]=> array(0) { } ["is_optional"]=> bool(false) } ["name"]=> string(9) "aaaaaaaa0" ["paramTypeInfo"]=> array(3) { ["name"]=> string(0) "" ["nullable"]=> bool(true) ["builtin"]=> bool(false) } } object(ReflectionParameter)#5 (3) { ["info"]=> array(11) { ["index"]=> int(1) ["name"]=> string(8) "aaaaaaaa" ["type"]=> string(0) "" ["type_hint"]=> string(0) "" ["type_hint_builtin"]=> bool(false) ["function"]=> string(1) "b" ["class"]=> string(1) "a" ["nullable"]=> bool(true) ["type_hint_nullable"]=> bool(true) ["attributes"]=> array(0) { } ["is_optional"]=> bool(false) } ["name"]=> string(8) "aaaaaaaa" ["paramTypeInfo"]=> array(3) { ["name"]=> string(0) "" ["nullable"]=> bool(true) ["builtin"]=> bool(false) } }
Output for hhvm-3.10.0
object(ReflectionParameter)#4 (2) { ["info"]=> array(9) { ["index"]=> int(0) ["name"]=> string(9) "aaaaaaaa0" ["type"]=> string(0) "" ["type_hint"]=> string(0) "" ["function"]=> string(1) "b" ["class"]=> string(1) "a" ["nullable"]=> bool(true) ["attributes"]=> array(0) { } ["is_optional"]=> bool(false) } ["name"]=> string(9) "aaaaaaaa0" } object(ReflectionParameter)#5 (2) { ["info"]=> array(9) { ["index"]=> int(1) ["name"]=> string(8) "aaaaaaaa" ["type"]=> string(0) "" ["type_hint"]=> string(0) "" ["function"]=> string(1) "b" ["class"]=> string(1) "a" ["nullable"]=> bool(true) ["attributes"]=> array(0) { } ["is_optional"]=> bool(false) } ["name"]=> string(8) "aaaaaaaa" }
Output for 5.0.0 - 5.1.6, 5.3.6 - 5.6.28
object(ReflectionParameter)#4 (1) { ["name"]=> string(8) "aaaaaaaa" } object(ReflectionParameter)#5 (1) { ["name"]=> string(8) "aaaaaaaa" }
Output for 5.2.0 - 5.3.5
object(ReflectionParameter)#4 (1) { ["name"]=> string(8) "aaaaaaaa" } object(ReflectionParameter)#5 (1) { ["name"]=> string(8) "" }
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/bJo3G on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/bJo3G on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/bJo3G on line 4
Process exited with code 255.