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 $t - microtime(true), PHP_EOL; $t = microtime(true); $result = array(); foreach($array as $v)$result[] = $v[0]; echo $t - microtime(true), 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.0110.00614.81
7.3.120.0020.01514.89
7.3.110.0090.00914.78
7.3.100.0030.01115.02
7.3.90.0080.00514.96
7.3.80.0070.00914.88
7.3.70.0050.00714.63
7.3.60.0070.00414.86
7.3.50.0030.00914.82
7.3.40.0080.00814.90
7.3.30.0030.01214.92
7.3.20.0080.00816.81
7.3.10.0030.01016.85
7.3.00.0020.00916.53
7.2.250.0100.01015.20
7.2.240.0100.00914.93
7.2.230.0040.01215.21
7.2.220.0050.00915.05
7.2.210.0040.00915.15
7.2.200.0030.00915.01
7.2.190.0070.00915.08
7.2.180.0070.00715.04
7.2.170.0080.01014.96
7.2.160.0070.01014.88
7.2.150.0100.00317.07
7.2.140.0040.01117.00
7.2.130.0130.00016.97
7.2.120.0030.00616.93
7.2.110.0110.00416.92
7.2.100.0080.00416.61
7.2.90.0090.00616.78
7.2.80.0090.00617.03
7.2.70.0100.00616.90
7.2.60.0060.00916.95
7.2.50.0000.01417.08
7.2.40.0040.01117.08
7.2.30.0070.00717.00
7.2.20.0070.01016.99
7.2.10.0100.00717.09
7.2.00.0070.00718.07
7.1.330.0050.01015.69
7.1.320.0080.00715.66
7.1.310.0040.01115.61
7.1.300.0090.00515.89
7.1.290.0020.01215.62
7.1.280.0060.00815.83
7.1.270.0030.01115.83
7.1.260.0060.00615.67
7.1.250.0110.00315.64
7.1.240.0030.00615.82
7.1.230.0110.00015.40
7.1.220.0000.01715.95
7.1.210.0000.01515.48
7.1.200.0060.00315.55
7.1.190.0070.00715.58
7.1.180.0000.01015.71
7.1.170.0030.00515.54
7.1.160.0030.01016.02
7.1.150.0030.01315.88
7.1.140.0000.01215.99
7.1.130.0060.00915.55
7.1.120.0030.00615.63
7.1.110.0110.00615.91
7.1.100.0080.00815.99
7.1.90.0070.00315.94
7.1.80.0030.01015.98
7.1.70.0020.00816.36
7.1.60.0030.01617.57
7.1.50.0110.00516.43
7.1.40.0000.01415.42
7.1.30.0060.00915.89
7.1.20.0130.00315.91
7.1.10.0080.00415.78
7.1.00.0050.03019.11
7.0.330.0030.01015.39
7.0.320.0030.00915.31
7.0.310.0040.01115.62
7.0.300.0030.00715.22
7.0.290.0100.00315.61
7.0.280.0040.00815.46
7.0.270.0000.01515.38
7.0.260.0070.00715.32
7.0.250.0120.00015.69
7.0.240.0000.00915.40
7.0.230.0080.00515.34
7.0.220.0040.00815.32
7.0.210.0060.00615.52
7.0.200.0030.00816.12
7.0.190.0110.00415.53
7.0.180.0030.01015.45
7.0.170.0030.01015.31
7.0.160.0070.00715.37
7.0.150.0000.01415.23
7.0.140.0060.04018.74
7.0.130.0090.00315.54
7.0.120.0080.03018.58
7.0.110.0090.00615.54
7.0.100.0060.00615.37
7.0.90.0030.01015.42
7.0.80.0070.00715.53
7.0.70.0000.01315.62
7.0.60.0050.04617.59
7.0.50.0060.02316.62
7.0.40.0020.04816.78
7.0.30.0140.03716.77
7.0.20.0100.02716.88
7.0.10.0200.04216.81
7.0.00.0070.02316.91
5.6.400.0060.00614.64
5.6.390.0040.01114.26
5.6.380.0060.00314.80
5.6.370.0110.00314.25
5.6.360.0090.00614.50
5.6.350.0100.00314.23
5.6.340.0070.00714.77
5.6.330.0000.01114.61
5.6.320.0090.00614.49
5.6.310.0080.00814.04
5.6.300.0100.00314.64
5.6.290.0140.00014.67
5.6.280.0030.04017.70
5.6.270.0090.00914.21
5.6.260.0000.01114.90
5.6.250.0040.00914.13
5.6.240.0030.01014.54
5.6.230.0040.00414.49
5.6.220.0000.01514.55
5.6.210.0100.04217.52
5.6.200.0070.02716.36
5.6.190.0140.03817.50
5.6.180.0030.04017.40
5.6.170.0130.02517.54
5.6.160.0100.04317.52
5.6.150.0050.04616.38
5.6.140.0030.02616.39
5.6.130.0090.04416.32
5.6.120.0050.05117.66
5.6.110.0070.02317.73
5.6.100.0070.02217.70
5.6.90.0080.04517.65
5.6.80.0050.04917.44
5.6.70.2310.01817.44
5.6.60.0030.00714.64
5.6.50.0040.01114.43
5.6.40.0030.01014.46
5.6.30.0030.01314.48
5.6.20.0040.00814.34
5.6.10.0000.01514.44
5.6.00.0040.00414.58
5.5.380.0040.01114.37
5.5.370.0070.01014.41
5.5.360.0090.00014.36
5.5.350.0030.03517.46
5.5.340.0070.04316.14
5.5.330.0030.04917.44
5.5.320.0220.03817.43
5.5.310.0170.04117.44
5.5.300.0080.02216.17
5.5.290.0030.04516.15
5.5.280.0050.02417.52
5.5.270.0100.03017.47
5.5.260.0020.02717.72
5.5.250.0030.05017.44
5.5.240.0110.02217.14
5.5.230.0040.00414.38
5.5.220.0100.00314.23
5.5.210.0090.00014.05
5.5.200.0030.01214.22
5.5.190.0070.00714.16
5.5.180.0040.00414.48
5.5.170.0000.01314.42
5.5.160.0000.01314.44
5.5.150.0040.00414.59
5.5.140.0040.01114.22
5.5.130.0080.00614.53
5.5.120.0030.01014.43
5.5.110.0090.00614.37
5.5.100.0040.01114.43
5.5.90.0060.00914.46
5.5.80.0030.00714.21
5.5.70.0030.00614.50
5.5.60.0070.00714.55
5.5.50.0040.00814.17
5.5.40.0080.00314.24
5.5.30.0030.00714.15
5.5.20.0070.01014.24
5.5.10.0100.00314.42
5.5.00.0060.00614.54
5.4.450.0040.04415.36
5.4.440.0060.04415.38
5.4.430.0070.04015.30
5.4.420.0070.04415.47
5.4.410.0050.04115.21
5.4.400.0070.02315.10
5.4.390.0040.04514.99
5.4.380.0110.03815.12
5.4.370.0050.04514.95
5.4.360.0130.02815.18
5.4.350.0050.04115.03
5.4.340.0020.02715.03
5.4.330.0100.00011.08
5.4.320.0090.03715.13
5.4.310.0080.04014.97
5.4.300.0070.02314.98
5.4.290.0030.02215.12
5.4.280.0050.02615.18
5.4.270.0100.03215.00
5.4.260.0150.03015.05
5.4.250.0030.04315.00
5.4.240.0070.04015.11
5.4.230.0080.04115.18
5.4.220.0000.03815.07
5.4.210.0070.03715.04
5.4.200.0020.03515.18
5.4.190.0050.03815.11
5.4.180.0100.03615.15
5.4.170.0070.03215.01
5.4.160.0050.03315.05
5.4.150.0060.02815.20
5.4.140.0080.04013.70
5.4.130.0070.02713.76
5.4.120.0050.02113.66
5.4.110.0030.03913.86
5.4.100.0060.01913.78
5.4.90.0070.03513.84
5.4.80.0070.02313.86
5.4.70.0090.02913.83
5.4.60.0040.02613.70
5.4.50.0050.03313.72
5.4.40.0050.02613.85
5.4.30.0070.02713.64
5.4.20.0060.02013.94
5.4.10.0060.02713.83
5.4.00.0100.03513.50
5.3.290.0070.02812.78
5.3.280.0100.03612.77
5.3.270.0080.03312.75
5.3.260.0050.04212.78
5.3.250.0050.04212.76
5.3.240.0070.03412.76
5.3.230.0070.03512.70
5.3.220.0060.01812.74
5.3.210.0050.02212.72
5.3.200.0050.01912.75
5.3.190.0000.02612.74
5.3.180.0050.04312.73
5.3.170.0070.03812.73
5.3.160.0030.02212.73
5.3.150.0070.03512.73
5.3.140.0010.04412.78
5.3.130.0030.03212.73
5.3.120.0020.03012.73
5.3.110.0080.02112.75
5.3.100.0050.03912.49
5.3.90.0050.03712.46
5.3.80.0020.03212.40
5.3.70.0030.03112.46
5.3.60.0020.03712.40
5.3.50.0050.02712.44
5.3.40.0030.02612.35
5.3.30.0070.02312.49
5.3.20.0070.03512.25
5.3.10.0050.03112.30
5.3.00.0030.02612.28
5.2.170.0030.03711.15
5.2.160.0030.05711.12
5.2.150.0130.05311.15
5.2.140.0100.05711.29
5.2.130.0070.05711.26
5.2.120.0030.06011.11
5.2.110.0030.05011.03
5.2.100.0030.06711.03
5.2.90.0130.02010.93
5.2.80.0070.04010.96
5.2.70.0000.03311.06
5.2.60.0030.03010.94
5.2.50.0100.06011.00
5.2.40.0100.03310.88
5.2.30.0070.04311.05
5.2.20.0070.05010.95
5.2.10.0170.05010.88
5.2.00.0070.05010.87
5.1.60.0000.03310.69
5.1.50.0030.02710.69
5.1.40.0030.05310.69
5.1.30.0030.05710.69
5.1.20.0000.03010.69
5.1.10.0030.02710.69
5.1.00.0070.03310.69
5.0.50.0030.05010.69
5.0.40.0030.03010.69
5.0.30.0000.05310.69
5.0.20.0000.03710.69
5.0.10.0030.02010.69
5.0.00.0070.06010.69
4.4.90.0030.01310.69
4.4.80.0030.03710.69
4.4.70.0070.03010.69
4.4.60.0000.02010.69
4.4.50.0000.02010.69
4.4.40.0000.05010.69
4.4.30.0000.03310.69
4.4.20.0000.03710.69
4.4.10.0000.02310.69
4.4.00.0030.05010.69
4.3.110.0000.01710.69
4.3.100.0030.03310.69
4.3.90.0000.02010.69
4.3.80.0000.03310.69
4.3.70.0000.02310.69
4.3.60.0000.03710.69
4.3.50.0000.02010.69
4.3.40.0000.05010.69
4.3.30.0000.02010.69
4.3.20.0030.03310.69
4.3.10.0030.02010.69
4.3.00.0000.02310.69

preferences:
35.62 ms | 401 KiB | 5 Q