run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1, 2, 3, 4, 5); $b=Array(); $i = 0; for($i=0;$i<=2;$i++){ switch($i){ case 0: $rand=mt_rand(0,1); $b[$i]=$a[$rand]; break; case 1: if ($rand==0){ $b[]=$a[$rand+1]; else{ $b[]=$a[$rand-1]; } } break; case 2: $b[$i]=$a[2]; break; } } print_r($array); ?>

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

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