3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('123', '456A', '78'); sort($a); print_r($a); $b = array('456A', '78', '123'); sort($b); print_r($b); $c = array('78', '123', '456A'); sort($c); print_r($c); $d = array('78', '456A', '123'); sort($d); print_r($d); while (list($chiave, $valore) = each($a)) { echo "A[" . $chiave . "] = " . $valore . "\n"; } while (list($chiave, $valore) = each($b)) { echo "B[" . $chiave . "] = " . $valore . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 123 [1] => 456A [2] => 78 ) Array ( [0] => 456A [1] => 78 [2] => 123 ) Array ( [0] => 78 [1] => 123 [2] => 456A ) Array ( [0] => 123 [1] => 456A [2] => 78 ) Fatal error: Uncaught Error: Call to undefined function each() in /in/8mlem:8 Stack trace: #0 {main} thrown in /in/8mlem on line 8
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.66 ms | 401 KiB | 8 Q