3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $hewan=array("a"=>"angsa","b"=>"bebek","c"=>"capung","d"=>"domba"); function proses(&$items,$key,$prefix){ $items="$item : $prefix"; } function tampil($item1,$key) { echo "$key.$item1 \n"; } array_walk($hewan,"tampil"); echo "after proses"; array_walk($hewan,"proses"); ?>
based on 8WPQJ
Output for 7.1.0 - 7.2.11
a.angsa b.bebek c.capung d.domba after proses Fatal error: Uncaught ArgumentCountError: Too few arguments to function proses(), 2 passed and exactly 3 expected in /in/GcY4k:4 Stack trace: #0 [internal function]: proses('angsa', 'a') #1 /in/GcY4k(15): array_walk(Array, 'proses') #2 {main} thrown in /in/GcY4k on line 4
Process exited with code 255.
Output for 5.1.0 - 5.6.38, 7.0.0 - 7.0.31
a.angsa b.bebek c.capung d.domba after proses Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5
Output for hhvm-3.22.0
a.angsa b.bebek c.capung d.domba after proses Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line -1 Notice: Undefined variable: item in /in/GcY4k on line -1 Notice: Undefined variable: prefix in /in/GcY4k on line -1 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line -1 Notice: Undefined variable: item in /in/GcY4k on line -1 Notice: Undefined variable: prefix in /in/GcY4k on line -1 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line -1 Notice: Undefined variable: item in /in/GcY4k on line -1 Notice: Undefined variable: prefix in /in/GcY4k on line -1 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line -1 Notice: Undefined variable: item in /in/GcY4k on line -1 Notice: Undefined variable: prefix in /in/GcY4k on line -1
Output for hhvm-3.10.1 - 3.21.3
a.angsa b.bebek c.capung d.domba after proses Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line 5 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line 5 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line 5 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5 Warning: proses() expects exactly 3 parameters, 2 given in /in/GcY4k on line 5 Notice: Undefined variable: item in /in/GcY4k on line 5 Notice: Undefined variable: prefix in /in/GcY4k on line 5
Output for 5.0.4 - 5.0.5
a.angsa b.bebek c.capung d.domba after proses Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5
Output for 4.3.0 - 5.0.3
a.angsa b.bebek c.capung d.domba after proses Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5 Warning: Missing argument 3 for proses() in /in/GcY4k on line 4 Notice: Undefined variable: item in /in/GcY4k on line 5