3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1,2,3,4,5,6,7,8,9); $callback = function($element){ echo($element); }; function walk($a, $index, $callback){ if (count($a) == $index + 1) { $callback($a[$index]); } else { $callback($a[$index]); walk($a, $index + 1); } } walk($array,0, $callback);
Output for git.master, git.master_jit, rfc.property-hooks
1 Fatal error: Uncaught ArgumentCountError: Too few arguments to function walk(), 2 passed in /in/UU9VZ on line 19 and exactly 3 expected in /in/UU9VZ:9 Stack trace: #0 /in/UU9VZ(19): walk(Array, 1) #1 /in/UU9VZ(25): walk(Array, 0, Object(Closure)) #2 {main} thrown in /in/UU9VZ on line 9
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:
49.7 ms | 401 KiB | 8 Q