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.0
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.3.21 - 7.0.20
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