3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("E", "A", NULL, "D", "C"); asort($a); echo "<pre>"; print_r($a); $b = array("Dog","Cat","Horse","Bear","Zebra"); $c = array(12, 11, 20, 30, 19); foreach($a as $k=>$v){ $b1[] = $b[$k]; $c1[] = $c[$k]; } echo "<pre>"; print_r($b1); echo "<pre>"; print_r($c1);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [2] => [1] => A [4] => C [3] => D [0] => E ) <pre>Array ( [0] => Horse [1] => Cat [2] => Zebra [3] => Bear [4] => Dog ) <pre>Array ( [0] => 20 [1] => 11 [2] => 19 [3] => 30 [4] => 12 )

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