3v4l.org

run code in 300+ PHP versions simultaneously
<HTML> <HEAD> <TITLE>Trabajando con matrices</TITLE> <META CHARSET="UTF-8" /> </HEAD> <BODY> <CENTER> <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 $GLOBALS['matriz1']; while(list($pos,$valor) = each($matriz1)) { echo "$pos, $valor<BR />\n"; } ?> </CENTER> </BODY> </HTML>
Output for git.master, git.master_jit, rfc.property-hooks
<HTML> <HEAD> <TITLE>Trabajando con matrices</TITLE> <META CHARSET="UTF-8" /> </HEAD> <BODY> <CENTER> <H2>Funcionamiento de <I>$GLOBALS, each, list y reset</I></H2> Fatal error: Uncaught Error: Call to undefined function each() in /in/SG5Od:14 Stack trace: #0 {main} thrown in /in/SG5Od on line 14
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:
39.91 ms | 401 KiB | 8 Q