3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rand = []; $max = 10000; for ($i = 0; $i < $max; $i++) { $rand[bin2hex(random_bytes(10))] = $i; } $max = 1000; $start = microtime(true); for ($i = 0; $i < $max; $i++) { $keys = []; foreach ($rand as $k => $v) { $keys[] = $k; } } printf("Took %.7f seconds per execution\n", (microtime(true) - $start) / $max); $max = 1000; $start = microtime(true); for ($i = 0; $i < $max; $i++) { $keys = array_keys($rand); } printf("Took %.7f seconds per execution\n", (microtime(true) - $start) / $max);
Output for git.master_jit
Took 0.0001431 seconds per execution Took 0.0000284 seconds per execution
Output for git.master
Took 0.0001537 seconds per execution Took 0.0000372 seconds per execution
Output for rfc.property-hooks
Took 0.0001437 seconds per execution Took 0.0000265 seconds per execution

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:
63.8 ms | 408 KiB | 5 Q