3v4l.org

run code in 300+ PHP versions simultaneously
<? $n=9999999; $a=1; $b=2; $start=microtime(1); for($i=1;$i<=$n;$i++) { if ($a!=$b) $c=$a+$b;else $c=8; } print 'normal: '.(microtime(1)-$start)."<br>\n"; $start=microtime(1); for($i=1;$i<=$n;$i++) { $c=($a!=$b)?($a+$b):8; } print 'ternary: '.(microtime(1)-$start)."<br>\n";
Output for git.master, git.master_jit
<? $n=9999999; $a=1; $b=2; $start=microtime(1); for($i=1;$i<=$n;$i++) { if ($a!=$b) $c=$a+$b;else $c=8; } print 'normal: '.(microtime(1)-$start)."<br>\n"; $start=microtime(1); for($i=1;$i<=$n;$i++) { $c=($a!=$b)?($a+$b):8; } print 'ternary: '.(microtime(1)-$start)."<br>\n";

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:
60.24 ms | 401 KiB | 7 Q