3v4l.org

run code in 300+ PHP versions simultaneously
<?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"); ?>
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'array_walk' (T_STRING), expecting ',' or ';' in /in/8WPQJ on line 15
Process exited with code 255.

preferences:
171.82 ms | 1395 KiB | 28 Q