3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 0 => [ 5 => 5 ], 1 => [ 7 => 7 ], 2 => [ 6 => 9 ], 3 => [ 2 => 2 ], 4 => [ 9 => 10 ], ]; foreach($array as $item) { //Atende ao objetivo, porem a função each foi descontinuada no PHP 7.2. //list($key, $value) = each($item); //Alternativamente você pode fazer. $key = key($item); $value = current($item); echo "$key => $value\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
5 => 5 7 => 7 6 => 9 2 => 2 9 => 10

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:
27.79 ms | 405 KiB | 5 Q