3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current = array( 750 => 2, 1000 => 1.3, 2000 => 1.2, 3000 => 1.1, 4000 => 1.0, 5000 => 0.9, 6000 => 0.8, 10000 => 0.75, ); function update($current) { $tiers = array( 0 => 3.5, 250 => 3.5, 500 => 3.5, 750 => 3, ); krsort($current); $prev = 0; foreach($current as $range => $spread) { if ( $range < 1000 ) continue; if ( $range >= 1000 && $range <= 5000 && $spread <= 1.1 ) $spread += 0.4; $prev = $tiers[$range] = max($spread, $prev); } ksort($tiers); return $tiers; } var_dump($current); var_dump(update($current));
Output for git.master, git.master_jit, rfc.property-hooks
array(8) { [750]=> int(2) [1000]=> float(1.3) [2000]=> float(1.2) [3000]=> float(1.1) [4000]=> float(1) [5000]=> float(0.9) [6000]=> float(0.8) [10000]=> float(0.75) } array(11) { [0]=> float(3.5) [250]=> float(3.5) [500]=> float(3.5) [750]=> int(3) [1000]=> float(1.5) [2000]=> float(1.5) [3000]=> float(1.5) [4000]=> float(1.4) [5000]=> float(1.3) [6000]=> float(0.8) [10000]=> float(0.75) }

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:
70.38 ms | 402 KiB | 8 Q