3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = []; for( $i=0; $i<7000; $i++ ) { for( $j=0; $j<500; $j++ ) { $all[$i][$j] = $j; } } $start = microtime(true); $mergedArray = array_merge(...$all); echo PHP_EOL . 'Array merge time: ' . microtime(true); $mergedArray = []; $start = microtime(true); foreach($all as &$templateClosingArray) { $mergedArray += $templateClosingArray; } echo PHP_EOL . 'Union time: ' . microtime(true);
Output for git.master_jit, git.master
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in /in/hi8hc on line 6 Stack trace: #0 {main}
Process exited with code 255.

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:
33 ms | 405 KiB | 5 Q