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 git.master, git.master_jit, rfc.property-hooks
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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.96 ms | 401 KiB | 8 Q