3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function x($x=null){ var_dump(func_num_args(), func_get_args()); } x(); x(null); x(1);
Output for 5.3.0 - 7.1.0
int(0) array(0) { } int(1) array(1) { [0]=> NULL } int(1) array(1) { [0]=> int(1) }
Output for 4.3.2 - 5.2.17
Fatal error: func_get_args(): Can't be used as a function parameter in /in/R0iG8 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: func_get_args(): Can't be used as a function parameter in /in/R0iG8 on line 3