3v4l.org

run code in 300+ PHP versions simultaneously
<H2>Funcionamiento de <I>$GLOBALS, each, list y reset</I></H2> <?php $matriz1 = array(0 => "Madrid", 1 => "Valencia", 2 => "Alicante", 3=> "Santander"); $var2; while($var2 = each($matriz1)) { var_dump($var2); echo "<BR />"; } ?> <BR /><BR /><BR /> <?php $matriz2 = $GLOBALS['matriz1']; while(list($pos,$valor) = each($matriz1)) { echo "$pos, $valor<BR />\n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
<H2>Funcionamiento de <I>$GLOBALS, each, list y reset</I></H2> Fatal error: Uncaught Error: Call to undefined function each() in /in/H7XAV:7 Stack trace: #0 {main} thrown in /in/H7XAV on line 7
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:
40.12 ms | 401 KiB | 8 Q