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]; }); 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.120.0100.00714.67
7.3.110.0080.00614.80
7.3.100.0140.00314.96
7.3.90.0030.00615.13
7.3.80.0130.00314.84
7.3.70.0120.00414.86
7.3.60.0090.00914.98
7.3.50.0080.00814.97
7.3.40.0030.00714.93
7.3.30.0040.01114.91
7.3.20.0040.01116.50
7.3.10.0050.00916.59
7.3.00.0070.00616.73
7.2.240.0100.00315.16
7.2.230.0060.01314.86
7.2.220.0080.00814.97
7.2.210.0070.00414.78
7.2.200.0130.00314.82
7.2.190.0080.00814.95
7.2.180.0060.00915.03
7.2.170.0030.01314.98
7.2.160.0100.00714.80
7.2.150.0040.01116.94
7.2.140.0070.00716.82
7.2.130.0060.00916.64
7.2.120.0090.00816.86
7.2.110.0060.00716.85
7.2.100.0050.01016.76
7.2.90.0110.00616.85
7.2.80.0080.00716.73
7.2.70.0070.00516.96
7.2.60.0050.00916.87
7.2.50.0060.00716.93
7.2.40.0030.01116.98
7.2.30.0020.01216.91
7.2.20.0020.00816.90
7.2.10.0040.01016.76
7.2.00.0040.00916.92
7.1.330.0030.01315.69
7.1.320.0080.00815.70
7.1.310.0100.00715.77
7.1.300.0060.01015.79
7.1.290.0030.01315.79
7.1.280.0000.01215.72
7.1.270.0090.00315.41
7.1.260.0070.00315.97
7.1.250.0080.00715.79
7.1.240.0030.00915.84
7.1.230.0070.01015.76
7.1.220.0000.01415.96
7.1.210.0040.00815.67
7.1.200.0110.00615.55
7.1.190.0070.00715.77
7.1.180.0090.00615.66
7.1.170.0030.00915.61
7.1.160.0070.00715.75
7.1.150.0000.00815.74
7.1.140.0090.00915.54
7.1.130.0000.01215.54
7.1.120.0000.01315.81
7.1.110.0070.00715.63
7.1.100.0030.00615.87
7.1.90.0000.01115.76
7.1.80.0060.00615.78
7.1.70.0050.00716.44
7.1.60.0050.01417.51
7.1.50.0070.01416.21
7.1.40.0040.00815.51
7.1.30.0130.00015.54
7.1.20.0040.00415.53
7.1.10.0040.00415.71
7.1.00.0050.04019.12
7.0.330.0090.00615.18
7.0.320.0080.00315.43
7.0.310.0080.00415.32
7.0.300.0160.00015.30
7.0.290.0040.00415.04
7.0.280.0030.00914.98
7.0.270.0060.01015.32
7.0.260.0030.00615.13
7.0.250.0080.00315.44
7.0.240.0130.00015.35
7.0.230.0030.01315.43
7.0.220.0070.00715.21
7.0.210.0030.00615.36
7.0.200.0050.00515.94
7.0.190.0000.01115.39
7.0.180.0000.01315.34
7.0.170.0040.00815.35
7.0.160.0080.00615.02
7.0.150.0030.01115.22
7.0.140.0030.04218.76
7.0.130.0000.01215.40
7.0.120.0000.01115.13
7.0.110.0030.01015.31
7.0.100.0070.02017.66
7.0.90.0170.02717.62
7.0.80.0120.02217.47
7.0.70.0270.02717.58
7.0.60.0260.04617.51
7.0.50.0230.04317.88
7.0.40.0040.04716.58
7.0.30.0050.04716.77
7.0.20.0050.04516.66
7.0.10.0080.04316.74
7.0.00.0050.04416.66
5.6.380.0040.00714.19
5.6.370.0000.01114.33
5.6.360.0050.00514.63
5.6.350.0000.01214.17
5.6.340.0070.00714.18
5.6.330.0110.00414.47
5.6.320.0030.00714.34
5.6.310.0080.00314.47
5.6.300.0000.00914.22
5.6.290.0070.00714.33
5.6.280.0020.04117.50
5.6.270.0030.01314.36
5.6.260.0060.00614.11
5.6.250.0030.02317.47
5.6.240.0020.02517.54
5.6.230.0030.02517.54
5.6.220.0110.03217.52
5.6.210.0070.04317.72
5.6.200.0050.04617.58
5.6.190.0030.04717.62
5.6.180.0080.04017.53
5.6.170.0040.04817.81
5.6.160.0030.04517.66
5.6.150.0090.03917.67
5.6.140.0050.04517.71
5.6.130.0070.04417.75
5.6.120.0100.04117.67
5.6.110.0030.04617.72
5.6.100.0030.05017.71
5.6.90.0050.04717.82
5.6.80.0080.03617.23
5.6.70.0050.04317.33
5.6.60.0060.02917.38
5.6.50.0050.04517.49
5.6.40.0070.02517.33
5.6.30.0110.03217.36
5.6.20.0000.05117.34
5.6.10.0100.03417.47
5.6.00.0090.04117.46
5.5.380.0070.02015.85
5.5.370.0090.04015.68
5.5.360.0070.03715.93
5.5.350.0070.02715.85
5.5.340.0070.03016.03
5.5.330.0070.04416.10
5.5.320.0070.04215.98
5.5.310.0050.04315.98
5.5.300.0100.03816.09
5.5.290.0030.04116.01
5.5.280.0040.04516.08
5.5.270.0070.04015.86
5.5.260.0080.03916.02
5.5.250.0050.04015.81
5.5.240.0140.03215.68
5.5.230.0030.04115.68
5.5.220.0060.04115.78
5.5.210.0120.03815.77
5.5.200.0060.03715.69
5.5.190.0080.04315.70
5.5.180.0090.03815.45
5.5.170.0100.00011.08
5.5.160.0060.04115.67
5.5.150.0100.02315.71
5.5.140.0040.02615.51
5.5.130.0050.04315.70
5.5.120.0060.04615.73
5.5.110.0080.04215.61
5.5.100.0030.04615.76
5.5.90.0080.03715.72
5.5.80.0060.04015.69
5.5.70.0070.04215.70
5.5.60.0120.03615.68
5.5.50.0100.04015.59
5.5.40.0050.03315.67
5.5.30.0050.04515.68
5.5.20.0080.03915.53
5.5.10.0070.04015.73
5.5.00.0150.04315.64
5.4.450.0100.03815.30
5.4.440.0070.04015.23
5.4.430.0050.04215.28
5.4.420.0040.04315.11
5.4.410.0050.04315.09
5.4.400.0070.02215.07
5.4.390.0050.04215.00
5.4.380.0020.04315.05
5.4.370.0020.04415.12
5.4.360.0060.03915.11
5.4.350.0080.04015.01
5.4.340.0070.04115.20
5.4.330.0030.00710.96
5.4.320.0050.04215.13
5.4.310.0090.03714.91
5.4.300.0100.02315.00
5.4.290.0050.02515.10
5.4.280.0080.02714.96
5.4.270.0060.03815.19
5.4.260.0030.03514.99
5.4.250.0060.03515.24
5.4.240.0050.04415.14
5.4.230.0070.02315.29
5.4.220.0060.03914.99
5.4.210.0070.04015.13
5.4.200.0070.04015.11
5.4.190.0070.04015.27
5.4.180.0060.03815.00
5.4.170.0040.04515.00
5.4.160.0020.04215.09
5.4.150.0030.04615.11
5.4.140.0080.02513.79
5.4.130.0050.03913.80
5.4.120.0060.03713.74
5.4.110.0130.03113.74
5.4.100.0080.03613.91
5.4.90.0070.03513.68
5.4.80.0040.02613.84
5.4.70.0050.04013.84
5.4.60.0040.03813.69
5.4.50.0070.03113.79
5.4.40.0030.04313.54
5.4.30.0040.04213.75
5.4.20.0010.04113.77
5.4.10.0050.03813.68
5.4.00.0030.03813.57
5.3.290.0050.04312.51
5.3.280.0030.04012.54
5.3.270.0030.04112.52
5.3.260.0100.03012.48
5.3.250.0050.03812.54
5.3.240.0100.03112.54
5.3.230.0100.03612.47
5.3.220.0030.03912.53
5.3.210.0060.03712.53
5.3.200.0070.03012.53
5.3.190.0070.03712.52
5.3.180.0100.03312.53
5.3.170.0070.02212.50
5.3.160.0100.01512.52
5.3.150.0050.03712.52
5.3.140.0080.03512.45
5.3.130.0040.02812.45
5.3.120.0060.03612.44
5.3.110.0080.03212.52
5.3.100.0090.03712.24
5.3.90.0030.04012.24
5.3.80.0030.04112.23
5.3.70.0070.03612.25
5.3.60.0070.03812.12
5.3.50.0020.02512.21
5.3.40.0050.04112.21
5.3.30.0070.03712.17
5.3.20.0080.03511.98
5.3.10.0070.03612.05
5.3.00.0030.03912.06
5.2.170.0060.03011.03
5.2.160.0030.03311.03
5.2.150.0070.03311.03
5.2.140.0040.03511.03
5.2.130.0070.03211.03
5.2.120.0020.03411.03
5.2.110.0070.03211.03
5.2.100.0030.03111.03
5.2.90.0030.02211.03
5.2.80.0070.02811.03
5.2.70.0110.02311.03
5.2.60.0080.03111.03
5.2.50.0050.03211.03
5.2.40.0060.03011.03
5.2.30.0030.02511.03
5.2.20.0070.02811.03
5.2.10.0060.01911.03
5.2.00.0030.03311.03
5.1.60.0040.02311.03
5.1.50.0020.03111.03
5.1.40.0020.01911.03
5.1.30.0040.03011.03
5.1.20.0080.02711.03
5.1.10.0070.01311.03
5.1.00.0040.02811.03
5.0.50.0070.02311.03
5.0.40.0040.02111.03
5.0.30.0030.02511.03
5.0.20.0020.02511.03
5.0.10.0000.02511.03
5.0.00.0050.03411.03
4.4.90.0020.02111.03
4.4.80.0030.02011.03
4.4.70.0040.01411.03
4.4.60.0030.00911.03
4.4.50.0000.02111.03
4.4.40.0020.02811.03
4.4.30.0070.01511.03
4.4.20.0030.01211.03
4.4.10.0000.02011.03
4.4.00.0060.02311.03
4.3.110.0030.01811.03
4.3.100.0000.01311.03
4.3.90.0040.01711.03
4.3.80.0060.02511.03
4.3.70.0030.01711.03
4.3.60.0020.02011.03
4.3.50.0040.02011.03
4.3.40.0060.01511.03
4.3.30.0010.02111.03
4.3.20.0020.02011.03
4.3.10.0020.02011.03
4.3.00.0030.02011.03

preferences:
46.29 ms | 400 KiB | 5 Q