3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hello(float $a, float $b, float $c, float $d){ return $a+$b+$c+$d; } function hello2($a, $b, $c, $d){ return $a+$b+$c+$d; } function millis(){ return round(microtime(true) * 1000); } $a = array(1,2,3,4,"test"); $t = millis(); for($i=0;$i<500000;$i++){ hello($a[0],$a[1],$a[2],$a[3]); } echo("with types: " . (millis() -$t) . " ms\n"); $t = millis(); for($i=0;$i<500000;$i++){ hello2($a[0],$a[1],$a[2],$a[3]); } echo("without types: " . (millis() -$t) . " ms\n");
Output for git.master
with types: 65 ms without types: 23 ms
Output for git.master_jit
with types: 69 ms without types: 20 ms

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