3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [1, 'xxx', 'yyy'], [2, 'xxx', 'yyy'], [3, 'xxx', 'yyy'], [4, 'xxx', 'yyy'], [5, 'xxx', 'yyy'], [6, 'xxx', 'yyy'], [7, 'xxx', 'yyy'], [8, 'xxx', 'yyy'], [9, 'xxx', 'yyy'], [10, 'xxx', 'yyy'], [11, 'xxx', 'yyy'], [12, 'xxx', 'yyy'], [13, 'xxx', 'yyy'], [14, 'xxx', 'yyy'], [15, 'xxx', 'yyy'], [16, 'xxx', 'yyy'], [17, 'xxx', 'yyy'], [18, 'xxx', 'yyy'], [19, 'xxx', 'yyy'] ]; $t = microtime(true); $result = array_map(function($v){ return $v[0]; }, $array); echo microtime(true) - $t, PHP_EOL; $t = microtime(true); $result = array(); foreach($array as $v)$result[] = $v[0]; echo microtime(true) - $t, PHP_EOL; ?>

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)
7.3.10.0070.00716.63
7.3.00.0040.01116.37
7.2.130.0060.00317.09
7.2.120.0070.01016.61
7.2.110.0070.00716.78
7.2.100.0090.00616.91
7.2.90.0030.00716.84
7.2.80.0030.00616.86
7.2.70.0070.00716.97
7.2.60.0090.00317.10
7.2.50.0070.00317.01
7.2.40.0000.01216.62
7.2.30.0060.00616.78
7.2.20.0060.00617.12
7.2.10.0030.01216.89
7.2.00.0030.01316.99
7.1.250.0040.01215.88
7.1.70.0030.00617.33
7.1.60.0090.01219.40
7.1.50.0120.01216.66
7.1.00.0100.04322.33
7.0.200.0080.00016.44
7.0.140.0030.06722.15
7.0.60.0170.06319.93
7.0.50.0070.06017.90
7.0.40.0070.08317.76
7.0.30.0030.05717.86
7.0.20.0170.06317.84
7.0.10.0070.07717.84
7.0.00.0130.07717.74
5.6.280.0070.07021.05
5.6.210.0070.09020.48
5.6.200.0100.06018.22
5.6.190.0130.04318.18
5.6.180.0100.07718.19
5.6.170.0130.08018.28
5.6.160.0030.05318.22
5.6.150.0100.08018.23
5.6.140.0170.07018.28
5.6.130.0070.06718.24
5.6.120.0030.08318.29
5.6.110.0070.08318.20
5.6.100.0130.03318.20
5.6.90.0000.06018.16
5.6.80.0030.05717.57
5.6.70.0070.04717.61
5.6.60.0100.04717.59
5.6.50.0070.08017.57
5.6.40.0070.07717.57
5.6.30.0070.08017.54
5.6.20.0070.08017.54
5.6.10.0100.07317.63
5.6.00.0100.07717.46
5.5.350.0270.07720.36
5.5.340.0130.07317.94
5.5.330.0070.08317.96
5.5.320.0030.08018.04
5.5.310.0030.05718.07
5.5.300.0030.07717.98
5.5.290.0130.07718.08
5.5.280.0200.06317.98
5.5.270.0000.05717.98
5.5.260.0070.05317.98
5.5.250.0030.08317.83
5.5.240.0130.07017.41
5.5.230.0030.08317.36
5.5.220.0100.07317.42
5.5.210.0100.04717.46
5.5.200.0070.05017.45
5.5.190.0000.05317.35
5.5.180.0100.05317.29
5.5.160.0030.08017.43
5.5.150.0100.07317.38
5.5.140.0100.08017.37
5.5.130.0130.06317.28
5.5.120.0100.07017.38
5.5.110.0070.08317.32
5.5.100.0030.08017.19
5.5.90.0000.07017.32
5.5.80.0100.07717.24
5.5.70.0000.07017.26
5.5.60.0070.03717.21
5.5.50.0070.07317.20
5.5.40.0030.08017.23
5.5.30.0070.05317.18
5.5.20.0030.04317.22
5.5.10.0070.04017.19
5.5.00.0200.04717.27
5.4.450.0100.04319.35
5.4.440.0070.05019.46
5.4.430.0130.07019.31
5.4.420.0070.05719.30
5.4.410.0100.07719.21
5.4.400.0030.06019.00
5.4.390.0030.04019.04
5.4.380.0000.08719.10
5.4.370.0130.07318.98
5.4.360.0030.05719.12
5.4.350.0100.08018.98
5.4.340.0100.07019.02
5.4.320.0030.07319.27
5.4.310.0030.07319.09
5.4.300.0070.08319.27
5.4.290.0130.07019.04
5.4.280.0070.07719.01
5.4.270.0030.08318.97
5.4.260.0070.08019.13
5.4.250.0030.07018.97
5.4.240.0000.08319.05
5.4.230.0030.07319.05
5.4.220.0100.04019.05
5.4.210.0070.05019.13
5.4.200.0070.08019.26
5.4.190.0070.06319.01
5.4.180.0100.07019.02
5.4.170.0230.05019.26
5.4.160.0030.08019.02
5.4.150.0070.06319.02
5.4.140.0100.07716.55
5.4.130.0170.06316.39
5.4.120.0070.07016.54
5.4.110.0000.07316.40
5.4.100.0100.06316.30
5.4.90.0170.06016.31
5.4.80.0100.03716.40
5.4.70.0030.07716.38
5.4.60.0100.07016.44
5.4.50.0070.07316.38
5.4.40.0100.04716.32
5.4.30.0030.07716.31
5.4.20.0030.08016.61
5.4.10.0000.08016.40
5.4.00.0070.06715.84
5.3.290.0100.04014.63
5.3.280.0100.04014.55
5.3.270.0130.07314.43
5.3.260.0070.07014.68
5.3.250.0070.07314.55
5.3.240.0070.06314.43
5.3.230.0070.05314.51
5.3.220.0100.07014.54
5.3.210.0070.04314.53
5.3.200.0000.08714.39
5.3.190.0000.05014.53
5.3.180.0070.06714.54
5.3.170.0100.05014.47
5.3.160.0130.07014.50
5.3.150.0100.07714.54
5.3.140.0100.06014.54
5.3.130.0070.06714.32
5.3.120.0070.07714.48
5.3.110.0100.06714.51
5.3.100.0130.07313.95
5.3.90.0200.05713.84
5.3.80.0070.06713.87
5.3.70.0030.04313.79
5.3.60.0070.06013.96
5.3.50.0070.07713.92
5.3.40.0100.06313.89
5.3.30.0030.07313.98
5.3.20.0030.06013.67
5.3.10.0070.07313.73
5.3.00.0070.07013.57
5.2.170.0070.05711.08
5.2.160.0070.03711.07
5.2.150.0070.05711.07
5.2.140.0030.05011.17
5.2.130.0100.06311.07
5.2.120.0070.05711.08
5.2.110.0030.06011.07
5.2.100.0030.05711.08
5.2.90.0070.04311.25
5.2.80.0030.04311.02
5.2.70.0070.06311.05
5.2.60.0130.05310.83
5.2.50.0070.06011.01
5.2.40.0030.04710.82
5.2.30.0100.05310.74
5.2.20.0000.06310.79
5.2.10.0030.02710.89
5.2.00.0070.02310.61
5.1.60.0000.0279.98
5.1.50.0070.0209.93
5.1.40.0030.02310.01
5.1.30.0030.02310.17
5.1.20.0030.03710.24
5.1.10.0000.02710.05
5.1.00.0000.02710.08
5.0.50.0030.0178.50
5.0.40.0000.0208.39
5.0.30.0030.0308.16
5.0.20.0030.0178.24
5.0.10.0070.0338.01
5.0.00.0030.0308.14
4.4.90.0030.0377.84
4.4.80.0030.0237.84
4.4.70.0030.0277.84
4.4.60.0030.0177.84
4.4.50.0100.0207.84
4.4.40.0000.0237.84
4.4.30.0070.0107.84
4.4.20.0070.0107.84
4.4.10.0000.0177.84
4.4.00.0030.0207.84
4.3.110.0000.0177.84
4.3.100.0000.0177.84
4.3.90.0030.0377.84
4.3.80.0000.0237.84
4.3.70.0000.0237.84
4.3.60.0030.0237.84
4.3.50.0000.0237.84
4.3.40.0030.0337.84
4.3.30.0000.0237.84
4.3.20.0030.0137.84
4.3.10.0000.0177.84
4.3.00.0000.0137.84