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 number_format(microtime(true) - $t, 10), PHP_EOL; $t = microtime(true); $result = array(); foreach($array as $v)$result[] = $v[0]; echo number_format(microtime(true) - $t, 10), 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.100.0060.00814.92
7.3.90.0100.00414.82
7.3.80.0090.00514.87
7.3.70.0050.00914.82
7.3.60.0090.00714.79
7.3.50.0070.00814.86
7.3.40.0070.00814.86
7.3.30.0070.00714.80
7.3.20.0060.00814.82
7.3.10.0080.00915.41
7.3.00.0060.01215.49
7.2.230.0050.01014.94
7.2.220.0060.01015.08
7.2.210.0090.00615.28
7.2.200.0090.00614.96
7.2.190.0120.00614.96
7.2.180.0070.00915.00
7.2.170.0090.00615.03
7.2.160.0070.00914.99
7.2.150.0060.00915.07
7.2.140.0090.00915.24
7.2.130.0100.00815.68
7.2.120.0080.00915.69
7.2.110.0060.01215.58
7.2.100.0040.01115.79
7.2.90.0100.00415.68
7.2.80.0140.00715.64
7.2.70.0050.01515.61
7.2.60.0100.00715.55
7.2.50.0180.00715.83
7.2.40.0110.00315.79
7.2.30.0150.01115.69
7.2.20.0080.00715.63
7.2.10.0070.01115.73
7.2.00.0090.00916.63
7.1.320.0170.00714.06
7.1.310.0090.00813.94
7.1.300.0120.00413.94
7.1.290.0130.00513.93
7.1.280.0080.01014.13
7.1.270.0050.01213.91
7.1.260.0050.01013.93
7.1.250.0080.00514.49
7.1.240.0120.00713.57
7.1.230.0080.01113.94
7.1.220.0060.01113.60
7.1.210.0060.01114.02
7.1.200.0030.01213.97
7.1.190.0100.00813.99
7.1.180.0140.00513.86
7.1.170.0080.01213.71
7.1.160.0040.01213.84
7.1.150.0130.00613.81
7.1.140.0030.01413.83
7.1.130.0050.01613.79
7.1.120.0100.00913.67
7.1.110.0140.00613.68
7.1.100.0100.00913.41
7.1.90.0080.01213.62
7.1.80.0130.00713.71
7.1.70.0060.01015.02
7.1.60.0090.00614.86
7.1.50.0110.00514.96
7.1.40.0140.00615.00
7.1.30.0120.00314.96
7.1.20.0050.01015.02
7.1.10.0100.01215.02
7.1.00.0080.00814.96
7.0.330.0090.00613.43
7.0.320.0180.00713.55
7.0.310.0200.00213.48
7.0.300.0120.00813.36
7.0.290.0130.00713.41
7.0.280.0120.00813.68
7.0.270.0140.00813.53
7.0.260.0090.01313.55
7.0.250.0170.00713.60
7.0.240.0110.01313.59
7.0.230.0150.00613.47
7.0.220.0180.00713.36
7.0.210.0170.00613.61
7.0.200.0130.00414.87
7.0.190.0060.01015.03
7.0.180.0100.01314.94
7.0.170.0090.00714.90
7.0.160.0110.00614.88
7.0.150.0100.00714.90
7.0.140.0040.01214.93
7.0.130.0100.00914.92
7.0.120.0080.00714.86
7.0.110.0120.00314.93
7.0.100.0100.00514.86
7.0.90.0090.00714.93
7.0.80.0100.00914.88
7.0.70.0120.00514.89
7.0.60.0070.01015.00
7.0.50.0130.00814.91
7.0.40.0140.00414.82
7.0.30.0130.00715.00
7.0.20.0100.00915.04
7.0.10.0110.00814.89
7.0.00.0110.00814.91
5.6.400.0090.00914.39
5.6.390.0070.01214.34
5.6.380.0110.00714.41
5.6.370.0170.00814.44
5.6.360.0170.00314.60
5.6.350.0070.01614.66
5.6.340.0100.01114.48
5.6.330.0240.00414.40
5.6.320.0150.01414.51
5.6.310.0160.00814.14
5.6.300.0100.03016.69
5.6.290.0100.01916.62
5.6.280.0110.02316.61
5.6.270.0080.02216.67
5.6.260.0100.02016.58
5.6.250.0120.02216.50
5.6.240.0060.02316.42
5.6.230.0080.02316.70
5.6.220.0140.01616.47
5.6.210.0100.02116.63
5.6.200.0110.02516.73
5.6.190.0120.02716.62
5.6.180.0100.02616.64
5.6.170.0070.02216.58
5.6.160.0090.01916.54
5.6.150.0120.02416.67
5.6.140.0120.03316.53
5.6.130.0130.03116.64
5.6.120.0060.02016.48
5.6.110.0110.01816.62
5.6.100.0110.01716.50
5.6.90.0120.01816.71
5.6.80.0120.01916.14
5.6.70.0100.02216.22
5.6.60.0100.02516.40
5.6.50.0160.02616.19
5.6.40.0100.02316.50
5.6.30.0100.02516.11
5.6.20.0080.02916.20
5.6.10.0070.02116.31
5.6.00.0090.02016.27
5.5.380.0070.02015.43
5.5.370.0120.01615.34
5.5.360.0110.01915.42
5.5.350.0070.02115.33
5.5.340.0100.02715.54
5.5.330.0120.03015.40
5.5.320.0100.03415.65
5.5.310.0080.03815.62
5.5.300.0100.01815.45
5.5.290.0100.02415.54
5.5.280.0100.02115.49
5.5.270.0100.01915.58
5.5.260.0100.02015.63
5.5.250.0050.02315.42
5.5.240.0100.02715.33
5.5.230.0120.03015.25
5.5.220.0080.01915.34
5.5.210.0120.01915.49
5.5.200.0030.03315.38
5.5.190.0090.03315.28
5.5.180.0100.03215.31
5.5.170.0100.00714.32
5.5.160.0090.02115.49
5.5.150.0120.01815.44
5.5.140.0090.02115.35
5.5.130.0100.01915.52
5.5.120.0100.01515.44
5.5.110.0070.01915.28
5.5.100.0030.02215.39
5.5.90.0090.01715.35
5.5.80.0140.01615.34
5.5.70.0070.02815.41
5.5.60.0070.01915.38
5.5.50.0070.03015.34
5.5.40.0090.02515.29
5.5.30.0100.02015.31
5.5.20.0160.01915.44
5.5.10.0120.01915.39
5.5.00.0090.02515.47
5.4.450.0050.02113.98
5.4.440.0090.01813.87
5.4.430.0120.01313.93
5.4.420.0110.01613.95
5.4.410.0070.01813.81
5.4.400.0080.01813.79
5.4.390.0110.01613.80
5.4.380.0120.02013.58
5.4.370.0100.02513.72
5.4.360.0080.03113.76
5.4.350.0080.02813.86
5.4.340.0090.01613.73
5.4.330.0100.00511.14
5.4.320.0080.01513.68
5.4.310.0070.03413.79
5.4.300.0080.01613.70
5.4.290.0070.01613.78
5.4.280.0100.01313.69
5.4.270.0080.01613.79
5.4.260.0070.01713.72
5.4.250.0060.01813.62
5.4.240.0080.02913.66
5.4.230.0050.02213.69
5.4.220.0070.01913.67
5.4.210.0090.01713.81
5.4.200.0060.03013.72
5.4.190.0050.02613.65
5.4.180.0110.01813.73
5.4.170.0060.03313.77
5.4.160.0080.02713.72
5.4.150.0090.01613.75
5.4.140.0080.02813.19
5.4.130.0060.03213.36
5.4.120.0070.02513.35
5.4.110.0060.02513.28
5.4.100.0040.01913.36
5.4.90.0040.02913.20
5.4.80.0050.03413.27
5.4.70.0080.02113.35
5.4.60.0080.02213.32
5.4.50.0120.02713.27
5.4.40.0090.02613.30
5.4.30.0040.01913.18
5.4.20.0060.01713.28
5.4.10.0060.01813.25
5.4.00.0050.01913.32
5.3.290.0060.02512.72
5.3.280.0100.02412.64
5.3.270.0050.01912.64
5.3.260.0090.02112.66
5.3.250.0060.02712.68
5.3.240.0080.01412.64
5.3.230.0060.02912.64
5.3.220.0070.02612.64
5.3.210.0060.02812.64
5.3.200.0050.02412.64
5.3.190.0070.01512.64
5.3.180.0060.03312.74
5.3.170.0090.02512.69
5.3.160.0080.02712.74
5.3.150.0050.02912.73
5.3.140.0070.02012.68
5.3.130.0110.01312.64
5.3.120.0070.01712.66
5.3.110.0080.01512.67
5.3.100.0040.01612.68
5.3.90.0070.02812.70
5.3.80.0080.02412.64
5.3.70.0080.02612.64
5.3.60.0030.01912.66
5.3.50.0060.02712.64
5.3.40.0030.03012.65
5.3.30.0040.01712.64
5.3.20.0040.01712.64
5.3.10.0050.01712.64
5.3.00.0050.01612.64

preferences:
33.63 ms | 401 KiB | 5 Q