3v4l.org

run code in 500+ PHP versions simultaneously
<?php $test = array( 30.04, 0.00, 30.04, 0.00, 47.00, 17.03, 5.02, 25.08, 2.06, 32.06, 37.00, 7.07, ); $output = array(); foreach ($test as $key => $value) { // To make sure this will only be executed every second item if ($key % 2 !== 0) { continue; } $next = ''; if (!isset($test[$key+1])) { break; } else { $next = $test[$key+1]; } $output[$key] = $value . ' is ' . ($value < $next ? "lower" : ($value > $next ? 'higher' : 'equal')) . ' than ' . $next; } echo '<pre>'; print_r($output);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => 30.04 is higher than 0 [2] => 30.04 is higher than 0 [4] => 47 is higher than 17.03 [6] => 5.02 is lower than 25.08 [8] => 2.06 is lower than 32.06 [10] => 37 is higher than 7.07 )

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:
43.92 ms | 1994 KiB | 4 Q