3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function a($a=1, $b=2, $c=3) { switch (func_num_args()) { case 3: echo 3, "\n";break; case 2: echo 2, "\n";break; default: echo '0 or 1', "\n";break; } } a(); a(1); a(1,2);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0 or 1 0 or 1 2