3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function fuck($str, $arr) { $a = $str; foreach($arr as $b) { $a .= $b; } return $a; } fuck('test');
Output for 7.1.0 - 7.3.0beta1
Fatal error: Uncaught ArgumentCountError: Too few arguments to function fuck(), 1 passed in /in/6gfQc on line 13 and exactly 2 expected in /in/6gfQc:3 Stack trace: #0 /in/6gfQc(13): fuck('test') #1 {main} thrown in /in/6gfQc on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.24
Warning: Missing argument 2 for fuck(), called in /in/6gfQc on line 13 and defined in /in/6gfQc on line 3 Notice: Undefined variable: arr in /in/6gfQc on line 6 Warning: Invalid argument supplied for foreach() in /in/6gfQc on line 6
Output for hhvm-3.22.0
Warning: fuck() expects exactly 2 parameters, 1 given in /in/6gfQc on line -1 Notice: Undefined variable: arr in /in/6gfQc on line -1 Warning: Invalid argument supplied for foreach() in /in/6gfQc on line -1
Output for hhvm-3.18.5 - 3.21.3
Warning: fuck() expects exactly 2 parameters, 1 given in /in/6gfQc on line 5 Notice: Undefined variable: arr in /in/6gfQc on line 9 Warning: Invalid argument supplied for foreach() in /in/6gfQc on line 9