3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; $a[0] = 2; $a[1] = 7; $a[2] = 5; $a[3] = 2; $a[4] = 2; $a[5] = 3; $min_val = min($a); $min_indexes = []; foreach($a as $i => $val){ if($val == $min_val) $min_indexes[] = $i; } print_r($min_indexes); echo $min_indexes[rand(0,count($min_indexes)-1)];
Output for git.master
Array ( [0] => 0 [1] => 3 [2] => 4 ) 0
Output for git.master_jit
Array ( [0] => 0 [1] => 3 [2] => 4 ) 3

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.21 ms | 406 KiB | 5 Q