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'], [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.4.00.0060.00914.87
7.3.120.0070.01114.75
7.3.110.0060.01214.74
7.3.100.0030.01014.85
7.3.90.0040.01115.14
7.3.80.0070.01015.16
7.3.70.0060.00314.95
7.3.60.0070.00714.66
7.3.50.0000.01514.75
7.3.40.0050.00914.78
7.3.30.0000.01414.80
7.3.20.0090.00916.41
7.3.10.0070.00916.55
7.3.00.0080.00716.67
7.2.250.0070.01015.05
7.2.240.0070.01415.08
7.2.230.0060.00614.93
7.2.220.0070.01115.20
7.2.210.0030.01315.18
7.2.200.0030.00614.77
7.2.190.0070.00715.24
7.2.180.0120.00315.19
7.2.170.0030.01015.02
7.2.130.0040.00816.91
7.2.120.0040.01117.02
7.2.110.0070.00716.93
7.2.100.0100.00716.92
7.2.90.0090.00616.83
7.2.80.0040.00817.10
7.2.70.0030.01016.94
7.2.60.0070.00716.92
7.2.50.0130.00016.59
7.2.40.0030.00716.74
7.2.30.0000.01516.83
7.2.20.0040.00816.87
7.2.10.0000.01016.75
7.2.00.0030.01016.78
7.1.330.0120.00315.84
7.1.320.0070.00715.80
7.1.310.0080.00515.63
7.1.300.0060.00315.83
7.1.290.0060.00315.86
7.1.280.0070.00315.86
7.1.270.0060.00915.89
7.1.260.0000.01315.74
7.1.250.0070.00715.84
7.1.240.0030.01015.77
7.1.230.0110.00315.93
7.1.220.0030.00615.69
7.1.210.0040.00415.71
7.1.200.0000.00715.59
7.1.190.0100.00315.75
7.1.180.0060.00915.89
7.1.170.0090.00315.92
7.1.160.0100.00315.69
7.1.150.0100.00315.79
7.1.140.0140.00015.89
7.1.130.0040.00815.87
7.1.120.0040.00815.66
7.1.110.0060.00316.02
7.1.100.0080.00415.63
7.1.90.0000.01415.80
7.1.80.0060.00615.96
7.1.70.0020.01116.55
7.1.60.0030.01317.50
7.1.50.0020.01516.54
7.1.40.0060.00616.03
7.1.30.0070.00715.59
7.1.20.0000.01215.91
7.1.10.0080.00015.84
7.1.00.0050.03819.13
7.0.330.0030.01415.21
7.0.320.0000.01015.41
7.0.310.0120.00315.60
7.0.300.0040.01115.50
7.0.290.0000.01015.29
7.0.280.0030.00715.29
7.0.270.0050.00515.45
7.0.260.0030.00715.40
7.0.250.0060.00315.43
7.0.240.0000.00915.52
7.0.230.0070.00415.32
7.0.220.0000.00715.36
7.0.210.0000.01415.31
7.0.200.0040.00515.92
7.0.190.0070.01015.61
7.0.180.0000.00715.39
7.0.170.0030.00715.35
7.0.160.0060.00615.11
7.0.150.0030.00615.40
7.0.140.0050.04118.84
7.0.130.0000.01315.03
7.0.120.0030.04018.73
7.0.110.0090.00915.51
7.0.100.0080.00415.56
7.0.90.0040.00815.49
7.0.80.0030.00915.53
7.0.70.0000.00915.52
7.0.60.0080.02317.71
7.0.50.0120.03216.79
7.0.40.0080.02716.87
7.0.30.0130.02716.88
7.0.20.0210.04316.79
7.0.10.0050.02416.80
7.0.00.0110.04516.75
5.6.380.0070.00714.75
5.6.370.0030.01214.70
5.6.360.0030.01014.70
5.6.350.0130.00014.34
5.6.340.0030.00914.41
5.6.330.0000.01414.33
5.6.320.0100.00414.58
5.6.310.0030.01314.69
5.6.300.0000.01714.74
5.6.290.0040.01114.39
5.6.280.0050.01014.16
5.6.270.0030.00614.64
5.6.260.0040.00814.76
5.6.250.0030.01314.30
5.6.240.0100.00014.72
5.6.230.0060.00614.23
5.6.220.0140.00314.44
5.6.210.0100.04017.46
5.6.200.0070.04416.33
5.6.190.0030.04517.64
5.6.180.0220.02217.43
5.6.170.0130.02317.49
5.6.160.0070.02417.47
5.6.150.0110.03916.40
5.6.140.0050.02516.22
5.6.130.0080.04216.29
5.6.120.0050.04917.67
5.6.110.0140.04017.81
5.6.100.0000.02717.70
5.6.90.0100.03817.91
5.6.80.0130.03817.31
5.6.70.0130.01014.20
5.6.60.0040.01214.24
5.6.50.0060.00614.19
5.6.40.0040.00714.36
5.6.30.0060.00314.62
5.6.20.0180.00414.51
5.6.10.0070.01414.57
5.6.00.0070.01114.55
5.5.380.0030.00611.04
5.5.370.0000.00811.32
5.5.360.0050.00510.93
5.5.350.0120.03715.77
5.5.340.0080.04314.64
5.5.330.0080.03215.89
5.5.320.0220.03515.80
5.5.310.0160.02615.92
5.5.300.0100.03714.67
5.5.290.0080.03314.70
5.5.280.0030.04716.11
5.5.270.0120.03716.01
5.5.260.0070.03816.09
5.5.250.0080.04516.06
5.5.240.0080.03715.64
5.5.230.0030.01011.45
5.5.220.0030.00611.29
5.5.210.0000.01111.20
5.5.200.0070.00410.97
5.5.190.0000.01211.23
5.5.180.0100.00011.30
5.5.170.0070.00311.13
5.5.160.0040.00411.40
5.5.150.0060.00611.39
5.5.140.0060.00311.10
5.5.130.0000.01011.14
5.5.120.0060.00611.36
5.5.110.0090.00311.39
5.5.100.0050.00511.48
5.5.90.0080.00311.36
5.5.80.0090.00611.15
5.5.70.0070.00711.38
5.5.60.0030.01011.16
5.5.50.0050.00211.12
5.5.40.0030.00911.43
5.5.30.0070.00711.39
5.5.20.0000.00911.12
5.5.10.0120.00011.13
5.5.00.0100.00311.27
5.4.450.0050.02215.24
5.4.440.0050.02215.46
5.4.430.0050.02615.40
5.4.420.0120.02915.30
5.4.410.0100.03315.10
5.4.400.0150.03514.97
5.4.390.0100.03715.17
5.4.380.0070.03215.17
5.4.370.0080.03015.22
5.4.360.0050.04815.14
5.4.350.0020.03315.19
5.4.340.0050.04215.16
5.4.330.0000.01011.20
5.4.320.0100.02315.06
5.4.310.0030.04415.27
5.4.300.0050.02715.20
5.4.290.0070.04315.24
5.4.280.0080.04215.10
5.4.270.0090.01814.86
5.4.260.0050.04315.23
5.4.250.0120.03215.06
5.4.240.0100.03815.20
5.4.230.0050.04415.23
5.4.220.0050.03115.08
5.4.210.0070.02715.27
5.4.200.0050.03114.93
5.4.190.0020.04515.09
5.4.180.0110.04015.11
5.4.170.0060.02015.03
5.4.160.0080.02015.14
5.4.150.0040.03915.09
5.4.140.0050.04213.93
5.4.130.0020.04013.83
5.4.120.0060.02813.89
5.4.110.0080.03913.74
5.4.100.0040.03613.89
5.4.90.0100.02813.91
5.4.80.0060.04113.86
5.4.70.0060.04213.74
5.4.60.0010.03113.87
5.4.50.0050.04213.82
5.4.40.0080.03013.86
5.4.30.0060.04013.82
5.4.20.0080.03013.75
5.4.10.0030.02513.94
5.4.00.0050.04113.46
5.3.290.0050.04012.39
5.3.280.0030.04312.35
5.3.270.0050.02912.26
5.3.260.0050.02212.36
5.3.250.0050.02512.37
5.3.240.0000.03312.37
5.3.230.0050.04212.24
5.3.220.0020.04112.25
5.3.210.0120.03712.32
5.3.200.0050.03812.31
5.3.190.0070.04112.25
5.3.180.0050.03812.37
5.3.170.0050.03012.40
5.3.160.0070.03812.32
5.3.150.0000.04512.40
5.3.140.0030.03512.38
5.3.130.0060.04112.34
5.3.120.0100.03712.45
5.3.110.0050.03012.41
5.3.100.0070.04012.08
5.3.90.0050.03612.11
5.3.80.0030.03612.00
5.3.70.0040.04012.08
5.3.60.0100.03012.01
5.3.50.0070.03712.06
5.3.40.0090.03611.99
5.3.30.0050.04211.93
5.3.20.0000.02711.79
5.3.10.0110.03311.76
5.3.00.0030.02911.77
5.2.170.0040.03010.37
5.2.160.0010.02610.48
5.2.150.0070.03210.48
5.2.140.0000.02410.44
5.2.130.0020.01810.38
5.2.120.0050.03310.35
5.2.110.0020.03510.42
5.2.100.0040.03310.46
5.2.90.0030.03210.34
5.2.80.0030.03410.30
5.2.70.0070.03410.32
5.2.60.0070.03010.31
5.2.50.0060.03010.30
5.2.40.0050.02310.29
5.2.30.0080.01310.24
5.2.20.0030.01610.28
5.2.10.0020.02010.27
5.2.00.0020.01710.18
5.1.60.0000.0279.83
5.1.50.0070.0199.86
5.1.40.0010.0249.80
5.1.30.0030.03510.02
5.1.20.0030.01710.01
5.1.10.0040.0259.81
5.1.00.0050.0289.85
5.0.50.0070.0229.13
5.0.40.0020.0148.98
5.0.30.0040.0178.89
5.0.20.0020.0218.88
5.0.10.0050.0188.91
5.0.00.0010.0338.93
4.4.90.0020.0168.65
4.4.80.0030.0208.65
4.4.70.0030.0138.65
4.4.60.0040.0128.65
4.4.50.0050.0108.65
4.4.40.0030.0218.65
4.4.30.0030.0138.65
4.4.20.0020.0188.65
4.4.10.0030.0108.65
4.4.00.0070.0208.65
4.3.110.0020.0138.65
4.3.100.0000.0168.65
4.3.90.0080.0158.65
4.3.80.0030.0238.65
4.3.70.0040.0138.65
4.3.60.0060.0168.65
4.3.50.0030.0188.65
4.3.40.0000.0258.65
4.3.30.0000.0138.65
4.3.20.0020.0158.65
4.3.10.0020.0188.65
4.3.00.0030.0088.65

preferences:
39.73 ms | 401 KiB | 5 Q