3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array_merge(range(0, 100), array()); shuffle($array); const LOOPS = 1000; $b = hrtime(true); for ($i = 0; $i < LOOPS; ++$i) { $c = $array; $c = array_unique($c); } $e = hrtime(true); print number_format( ($e - $b) / 1_000_000, 2). " ms\n"; $b = hrtime(true); for ($i = 0; $i < LOOPS; ++$i) { $c = $array; $d = array_keys(array_count_values($c)); } $e = hrtime(true); print number_format(($e - $b) / 1_000_000, 2). " ms\n";
Output for git.master_jit
3.32 ms 0.99 ms
Output for git.master
2.32 ms 0.84 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:
45.92 ms | 749 KiB | 4 Q