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
2.86 ms 1.27 ms
Output for git.master
3.95 ms 1.50 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.82 ms | 734 KiB | 4 Q