3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t1 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { hi1("hi", $i, [], new stdClass(), 0.0, true); } $t2 = hrtime(true); $t3 = hrtime(true); for ($i = 0; $i < 6000000; $i++) { hi2("hi", $i, [], new stdClass(), 0.0, true); } $t4 = hrtime(true); echo "Without types: " . (($t2 - $t1) / 1000000) . " ms\n"; echo "With types : " . (($t4 - $t3) / 1000000) . " ms\n"; /** * @param string $a * @param int $b * @param array $c * @param stdClass $d * @param float $e * @param bool $f * @return void */ function hi1($a, $b, $c, $d, $e, $f) { } function hi2(string $a, int $b, array $c, stdClass $d, float $e, bool $f): void { }
Output for git.master
Without types: 330.746293 ms With types : 449.324888 ms
Output for git.master_jit
Without types: 375.690569 ms With types : 466.335986 ms
Output for rfc.property-hooks
Without types: 209.268918 ms With types : 248.966273 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:
26.51 ms | 407 KiB | 5 Q