3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo1($bar) { $numargs = func_num_args(); echo $numargs."\n"; } function foo2($bar = 2) { $numargs = func_num_args(); echo $numargs."\n"; } foo1(2); foo2(); foo2(2);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1 0 1