3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = []; for( $i=0; $i<1000; $i++ ) { for( $j=0; $j<1000; $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);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.140.0550.04648.73
8.4.130.0310.02348.77
8.4.120.0310.02548.81
8.4.110.0420.04148.79
8.4.100.0760.04748.28
8.4.90.0620.05248.83
8.4.80.0680.06248.43
8.4.70.0590.04748.36
8.4.60.0520.04948.57
8.4.50.0720.03848.49
8.4.40.0640.04448.38
8.4.30.0550.04848.20
8.4.20.0650.05048.39
8.4.10.0740.04348.57
8.3.270.0830.04647.50
8.3.260.0650.04347.70
8.3.250.0500.04247.68
8.3.240.0740.06647.13
8.3.230.0460.03747.43
8.3.220.0580.03847.61
8.3.210.0620.05247.64
8.3.200.0510.06147.57
8.3.190.0270.02647.64
8.3.180.0530.05447.58
8.3.170.0650.05947.46
8.3.160.0650.05347.50
8.3.150.0630.04647.43
8.3.140.0550.04647.68
8.3.130.0640.04247.52
8.3.120.0300.02347.24
8.3.110.0480.04947.34
8.3.100.0620.04747.57
8.3.90.0600.05047.51
8.3.80.0520.04047.54
8.3.70.0730.03847.39
8.3.60.0620.04847.10
8.3.50.0780.06347.07
8.3.40.0470.04033.22
8.3.30.0400.04833.56
8.3.20.0450.04333.58
8.3.10.0460.04033.35
8.3.00.0330.04133.32
8.2.290.0580.05847.42
8.2.280.0530.05247.79
8.2.270.0520.04947.60
8.2.260.0590.04747.29
8.2.250.0550.05447.20
8.2.240.0520.05147.22
8.2.230.0450.05447.25
8.2.220.0520.05147.29
8.2.210.0560.04447.46
8.2.200.0420.05247.75
8.2.190.0580.03847.58
8.2.180.0280.03247.52
8.2.170.0300.03933.63
8.2.160.0440.04033.43
8.2.150.0350.03433.38
8.2.140.0250.01433.35
8.2.130.0470.03833.37
8.2.120.0510.04533.02
8.2.110.0440.04133.37
8.2.100.0490.04233.29
8.2.90.0440.05933.37
8.2.80.0210.01733.13
8.2.70.0230.01833.03
8.2.60.0490.04433.18
8.2.50.0500.04333.28
8.2.40.0490.04433.21
8.2.30.0610.04233.30
8.2.20.0510.03733.20
8.2.10.0310.04033.21
8.2.00.0500.04233.26

preferences:
28.75 ms | 403 KiB | 5 Q