3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0, 1000); $time = microtime(true); array_map(function($el) { return $el; }, $a); var_dump(microtime(true) - $time); $time = microtime(true); foreach ($a as $el) { } var_dump(microtime(true) - $time);

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.10.0070.01015.11
7.4.00.0070.01015.17
7.3.130.0130.00314.66
7.3.120.0070.00714.82
7.3.110.0050.01214.77
7.3.100.0060.00915.08
7.3.90.0070.00714.95
7.3.80.0050.00815.09
7.3.70.0050.00814.78
7.3.60.0030.01214.72
7.3.50.0080.00714.72
7.3.40.0050.00814.73
7.3.30.0100.00714.75
7.3.20.0050.00916.65
7.3.10.0100.00616.60
7.3.00.0060.00816.63
7.2.260.0050.01315.14
7.2.250.0040.01415.11
7.2.240.0060.01215.01
7.2.230.0100.00715.21
7.2.220.0110.00515.12
7.2.210.0060.01015.12
7.2.200.0050.01014.93
7.2.190.0030.01215.13
7.2.180.0030.00914.98
7.2.170.0090.00515.15
7.2.160.0100.00515.08
7.2.150.0090.00516.87
7.2.140.0080.00716.86
7.2.130.0080.00816.90
7.2.120.0110.00216.99
7.2.110.0050.00817.07
7.2.100.0050.00716.92
7.2.90.0080.00816.96
7.2.80.0090.00516.89
7.2.70.0070.00916.89
7.2.60.0120.00516.87
7.2.50.0050.01116.88
7.2.40.0090.00317.12
7.2.30.0080.00816.76
7.2.20.0030.01216.98
7.2.10.0090.00516.93
7.2.00.0040.01017.73
7.1.330.0040.01115.67
7.1.320.0020.01115.82
7.1.310.0070.00615.74
7.1.300.0060.00815.59
7.1.290.0070.00615.83
7.1.280.0050.00915.61
7.1.270.0070.00715.88
7.1.260.0010.00815.95
7.1.250.0020.00915.61
7.1.240.0090.00015.75
7.1.230.0040.00815.52
7.1.220.0080.00015.50
7.1.210.0060.00915.78
7.1.200.0130.00315.57
7.1.190.0070.00715.86
7.1.180.0110.00415.91
7.1.170.0070.00715.87
7.1.160.0060.00615.93
7.1.150.0040.01615.71
7.1.140.0070.00715.75
7.1.130.0040.00415.63
7.1.120.0100.00315.86
7.1.110.0050.00516.02
7.1.100.0060.00616.06
7.1.90.0000.01415.71
7.1.80.0000.01215.85
7.1.70.0040.00616.34
7.1.60.0030.01617.59
7.1.50.0200.00516.27
7.1.40.0000.01215.69
7.1.30.0070.00715.80
7.1.20.0040.01215.55
7.1.10.0070.00715.96
7.1.00.0050.04018.98
7.0.330.0030.00715.41
7.0.320.0030.01415.36
7.0.310.0070.00415.53
7.0.300.0040.00715.34
7.0.290.0090.00315.27
7.0.280.0070.01415.47
7.0.270.0070.00715.54
7.0.260.0060.00615.27
7.0.250.0030.00715.15
7.0.240.0000.00815.24
7.0.230.0060.00715.39
7.0.220.0030.00615.37
7.0.210.0100.00315.45
7.0.200.0090.00516.08
7.0.190.0030.01015.50
7.0.180.0000.00915.53
7.0.170.0060.00615.44
7.0.160.0000.00915.36
7.0.150.0000.01015.61
7.0.140.0050.03818.85
7.0.130.0040.01015.37
7.0.120.0030.01015.55
7.0.110.0030.00915.49
7.0.100.0100.04117.70
7.0.90.0110.04017.75
7.0.80.0060.04117.86
7.0.70.0050.03917.66
7.0.60.0070.05017.72
7.0.50.0090.04117.85
7.0.40.0120.04316.69
7.0.30.0050.04516.78
7.0.20.0070.04716.82
7.0.10.0070.03716.73
7.0.00.0050.04516.63
5.6.400.0060.01014.92
5.6.390.0070.00715.10
5.6.380.0120.00314.86
5.6.370.0040.01214.56
5.6.360.0130.00014.66
5.6.350.0040.01114.86
5.6.340.0110.01114.76
5.6.330.0030.00914.99
5.6.320.0090.00614.80
5.6.310.0040.01114.70
5.6.300.0030.01014.57
5.6.290.0060.00915.00
5.6.280.0070.04217.84
5.6.270.0070.00714.63
5.6.260.0060.01014.81
5.6.250.0100.03817.81
5.6.240.0080.04617.62
5.6.230.0100.04317.73
5.6.220.0030.04217.98
5.6.210.0030.03217.71
5.6.200.0020.05118.04
5.6.190.0070.04017.93
5.6.180.0030.04917.89
5.6.170.0070.04717.85
5.6.160.0100.02518.14
5.6.150.0100.03618.13
5.6.140.0060.03817.89
5.6.130.0030.04917.79
5.6.120.0040.03718.07
5.6.110.0030.04518.01
5.6.100.0110.04017.90
5.6.90.0110.04117.98
5.6.80.0040.04917.56
5.6.70.0070.04617.69
5.6.60.0070.04217.53
5.6.50.0060.02817.47
5.6.40.0090.04417.55
5.6.30.0050.04617.70
5.6.20.0080.04317.63
5.6.10.0050.03817.57
5.6.00.0100.04017.64
5.5.380.0080.04517.67
5.5.370.0030.05017.56
5.5.360.0110.04017.50
5.5.350.0050.04317.61
5.5.340.0070.03717.88
5.5.330.0080.02517.99
5.5.320.0090.04217.87
5.5.310.0080.04517.76
5.5.300.0050.04017.93
5.5.290.0050.04918.03
5.5.280.0100.03517.63
5.5.270.0100.02717.63
5.5.260.0140.02317.55
5.5.250.0050.04517.71
5.5.240.0050.04917.50
5.5.230.0060.03317.25
5.5.220.0060.04617.37
5.5.210.0080.04317.49
5.5.200.0080.04317.41
5.5.190.0120.04217.32
5.5.180.0030.04017.43
5.5.170.0080.00814.26
5.5.160.0050.04517.62
5.5.150.0090.04517.55
5.5.140.0080.04317.47
5.5.130.0070.04117.49
5.5.120.0050.02817.31
5.5.110.0030.04417.46
5.5.100.0030.04117.43
5.5.90.0100.04217.27
5.5.80.0020.04417.46
5.5.70.0020.05217.42
5.5.60.0020.03417.46
5.5.50.0100.04217.36
5.5.40.0110.03517.32
5.5.30.0060.04417.52
5.5.20.0060.03917.33
5.5.10.0100.03517.19
5.5.00.0070.03717.42
5.4.450.0110.03715.45
5.4.440.0080.04015.45
5.4.430.0050.04415.26
5.4.420.0030.04515.18
5.4.410.0070.04115.31
5.4.400.0020.04515.20
5.4.390.0080.04015.13
5.4.380.0110.03215.20
5.4.370.0060.04315.21
5.4.360.0030.04615.36
5.4.350.0080.03815.13
5.4.340.0030.04015.39
5.4.330.0030.01011.24
5.4.320.0050.04015.31
5.4.310.0040.03615.20
5.4.300.0110.03915.28
5.4.290.0090.03515.17
5.4.280.0050.03215.29
5.4.270.0050.04115.34
5.4.260.0060.04115.28
5.4.250.0080.04215.18
5.4.240.0110.03515.40
5.4.230.0050.04315.29
5.4.220.0030.04715.27
5.4.210.0020.04715.36
5.4.200.0120.04015.13
5.4.190.0150.02115.23
5.4.180.0050.03815.19
5.4.170.0090.04015.12
5.4.160.0050.03715.27
5.4.150.0050.04315.25
5.4.140.0080.03713.94
5.4.130.0050.03613.97
5.4.120.0070.04314.02
5.4.110.0080.03213.86
5.4.100.0100.03814.00
5.4.90.0020.03514.03
5.4.80.0070.03714.06
5.4.70.0070.04013.84
5.4.60.0080.03813.91
5.4.50.0050.03813.95
5.4.40.0040.04113.94
5.4.30.0090.04013.96
5.4.20.0100.03713.82
5.4.10.0080.03613.94
5.4.00.0030.03713.70
5.3.290.0050.03012.93
5.3.280.0050.04712.89
5.3.270.0070.03712.92
5.3.260.0040.03712.82
5.3.250.0070.02612.92
5.3.240.0100.03912.74
5.3.230.0030.04512.88
5.3.220.0080.03712.82
5.3.210.0080.03112.79
5.3.200.0030.04312.76
5.3.190.0070.04012.90
5.3.180.0060.03612.90
5.3.170.0020.04212.96
5.3.160.0030.04312.89
5.3.150.0090.03812.72
5.3.140.0050.04312.94
5.3.130.0080.04312.89
5.3.120.0050.04212.89
5.3.110.0090.04112.84
5.3.100.0080.03812.55
5.3.90.0000.04512.72
5.3.80.0080.03812.53
5.3.70.0030.04212.56
5.3.60.0080.04012.67
5.3.50.0080.03812.57
5.3.40.0070.02712.53
5.3.30.0030.04412.60
5.3.20.0020.04412.40
5.3.10.0080.04112.43
5.3.00.0090.03912.43
5.2.170.0030.06314.16
5.2.160.0070.05314.16
5.2.150.0000.07014.16
5.2.140.0000.06714.16
5.2.130.0100.05714.16
5.2.120.0030.05714.16
5.2.110.0070.06314.16
5.2.100.0100.05014.16
5.2.90.0070.03714.16
5.2.80.0070.06314.16
5.2.70.0000.06714.16
5.2.60.0030.04314.16
5.2.50.0070.06014.16
5.2.40.0070.06014.16
5.2.30.0070.05314.16
5.2.20.0000.04014.16
5.2.10.0030.06314.16
5.2.00.0100.05714.16
5.1.60.0030.05314.16
5.1.50.0030.05314.16
5.1.40.0070.05014.16
5.1.30.0070.05314.16
5.1.20.0000.05014.16
5.1.10.0030.05314.16
5.1.00.0070.05714.16
5.0.50.0100.04014.16
5.0.40.0030.04314.16
5.0.30.0070.05314.16
5.0.20.0070.04014.16
5.0.10.0070.03714.16
5.0.00.0030.06714.16
4.4.90.0000.03714.16
4.4.80.0030.03314.16
4.4.70.0030.03714.16
4.4.60.0030.03314.16
4.4.50.0000.03714.16
4.4.40.0030.05014.16
4.4.30.0070.01714.16
4.4.20.0070.01714.16
4.4.10.0000.03714.16
4.4.00.0000.05314.16
4.3.110.0030.03314.16
4.3.100.0100.02714.16
4.3.90.0000.03314.16
4.3.80.0000.05714.16
4.3.70.0000.04014.16
4.3.60.0070.03014.16
4.3.50.0000.03314.16
4.3.40.0030.05314.16
4.3.30.0000.03714.16
4.3.20.0000.03314.16
4.3.10.0030.02714.16
4.3.00.0000.03714.16

preferences:
38.82 ms | 401 KiB | 5 Q