3v4l.org

run code in 300+ PHP versions simultaneously
<?php $MAP = [ ['x', 'x', 'x', 'x'], ['x', 's', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'p', 'p', 'x'], ['x', 'x', 'x', 'x'], ]; function whatever_i_cba_naming_shit_at_this_time_of_night($data) { foreach ($data as $y => $row) { foreach ($row as $x => $cell) { yield ['x' => $x, 'y' => $y] => $cell; } } } foreach (whatever_i_cba_naming_shit_at_this_time_of_night($MAP) as $coordinates => $cell) { echo "{$coordinates['x']}/{$coordinates['y']} => $cell\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
0/0 => x 1/0 => x 2/0 => x 3/0 => x 0/1 => x 1/1 => s 2/1 => p 3/1 => x 0/2 => x 1/2 => p 2/2 => p 3/2 => x 0/3 => x 1/3 => p 2/3 => p 3/3 => x 0/4 => x 1/4 => p 2/4 => p 3/4 => x 0/5 => x 1/5 => p 2/5 => p 3/5 => x 0/6 => x 1/6 => x 2/6 => x 3/6 => x

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:
176.88 ms | 406 KiB | 5 Q