3v4l.org

run code in 500+ PHP versions simultaneously
<?php $numbers = range(0,100000); $start = microtime(true); $justThousand = []; foreach($numbers as $num){ if($num > 1000 && $num < 6000){ $justThousand[] = $num; } } $end = microtime(true); echo "foreach: ".$end - $start."\n"; $start = microtime(true); function IsThousand($num){ return $num > 1000 && $num < 6000; } $justThousand = array_filter($numbers,'IsThousand'); $end = microtime(true); echo "array_filter: ".$end - $start;
Output for git.master_jit
foreach: 0.0012249946594238 array_filter: 0.0024230480194092
Output for git.master
foreach: 0.0012438297271729 array_filter: 0.002316951751709

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:
56.18 ms | 741 KiB | 4 Q