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) { $b = $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.2.00.0000.01019.14
7.1.70.0000.00717.13
7.1.60.0130.01019.31
7.1.50.0090.01216.63
7.1.00.0030.07722.43
7.0.200.0060.00616.94
7.0.140.0070.07021.92
7.0.100.0130.08019.91
7.0.90.0230.07719.98
7.0.80.0070.08019.90
7.0.70.0030.08019.93
7.0.60.0170.08019.95
7.0.50.0130.05320.38
7.0.40.0100.07720.15
7.0.30.0170.07320.04
7.0.20.0200.07020.13
7.0.10.0030.06319.98
7.0.00.0030.07720.06
5.6.280.0100.07021.10
5.6.250.0130.07320.98
5.6.240.0030.09320.93
5.6.230.0100.06020.92
5.6.220.0070.08020.77
5.6.210.0100.08720.72
5.6.200.0000.07721.36
5.6.190.0030.08321.36
5.6.180.0070.07321.19
5.6.170.0070.07721.21
5.6.160.0070.08021.41
5.6.150.0100.08721.28
5.6.140.0070.07021.27
5.6.130.0170.07321.25
5.6.120.0070.08721.35
5.6.110.0100.08321.32
5.6.100.0030.07321.30
5.6.90.0070.05321.25
5.6.80.0100.08020.67
5.6.70.0130.06720.64
5.6.60.0030.08320.68
5.6.50.0030.08320.72
5.6.40.0100.08020.71
5.6.30.0170.04320.63
5.6.20.0130.07720.61
5.6.10.0070.08020.70
5.6.00.0130.07020.54
5.5.380.0070.08020.75
5.5.370.0070.06720.69
5.5.360.0030.08720.67
5.5.350.0170.08020.65
5.5.340.0070.08021.18
5.5.330.0130.07720.98
5.5.320.0200.06721.01
5.5.310.0030.08021.00
5.5.300.0070.08321.06
5.5.290.0100.08321.12
5.5.280.0130.08321.08
5.5.270.0130.08020.88
5.5.260.0100.08321.05
5.5.250.0070.08320.82
5.5.240.0100.07720.46
5.5.230.0170.05720.40
5.5.220.0070.08320.52
5.5.210.0130.07020.26
5.5.200.0200.06720.40
5.5.190.0070.07720.40
5.5.180.0130.07320.47
5.5.160.0100.08020.33
5.5.150.0070.08020.50
5.5.140.0030.08320.45
5.5.130.0130.07720.42
5.5.120.0100.06720.48
5.5.110.0070.08020.39
5.5.100.0130.07720.42
5.5.90.0130.07020.35
5.5.80.0170.06320.35
5.5.70.0230.06320.30
5.5.60.0100.05720.21
5.5.50.0100.08020.39
5.5.40.0130.07020.41
5.5.30.0130.06720.39
5.5.20.0000.06020.39
5.5.10.0070.03720.21
5.5.00.0030.04720.20
5.4.450.0100.07319.59
5.4.440.0130.06019.57
5.4.430.0030.08319.64
5.4.420.0170.07019.56
5.4.410.0030.07319.57
5.4.400.0100.06719.08
5.4.390.0000.08019.37
5.4.380.0170.05319.24
5.4.370.0030.08319.41
5.4.360.0030.08319.28
5.4.350.0070.07719.12
5.4.340.0070.07719.26
5.4.320.0100.07319.24
5.4.310.0000.07719.41
5.4.300.0100.07319.27
5.4.290.0130.07319.32
5.4.280.0070.07319.25
5.4.270.0170.06019.22
5.4.260.0100.07719.43
5.4.250.0130.06719.08
5.4.240.0100.08019.40
5.4.230.0070.06019.43
5.4.220.0030.07019.31
5.4.210.0070.07319.39
5.4.200.0070.06319.32
5.4.190.0070.04019.30
5.4.180.0100.03319.25
5.4.170.0000.04319.47
5.4.160.0100.06319.31
5.4.150.0030.03719.09
5.4.140.0100.05716.57
5.4.130.0000.04316.62
5.4.120.0030.07716.54
5.4.110.0030.06716.68
5.4.100.0130.04316.73
5.4.90.0030.03316.69
5.4.80.0100.03016.63
5.4.70.0030.03716.53
5.4.60.0070.03316.71
5.4.50.0000.06716.75
5.4.40.0130.02716.71
5.4.30.0030.04716.80
5.4.20.0100.03316.73
5.4.10.0030.06016.63
5.4.00.0070.04016.01
5.3.290.0070.08014.96
5.3.280.0070.06714.89
5.3.270.0030.04714.86
5.3.260.0100.03714.91
5.3.250.0070.03314.87
5.3.240.0030.03715.03
5.3.230.0030.03714.91
5.3.220.0000.05014.94
5.3.210.0030.07715.02
5.3.200.0070.03714.82
5.3.190.0030.03714.98
5.3.180.0170.05314.94
5.3.170.0030.04014.89
5.3.160.0030.03715.01
5.3.150.0000.05315.02
5.3.140.0070.04714.89
5.3.130.0000.03714.98
5.3.120.0100.03014.80
5.3.110.0000.03714.88
5.3.100.0070.05314.46
5.3.90.0000.04014.26
5.3.80.0070.03714.31
5.3.70.0070.03314.43
5.3.60.0030.03714.34
5.3.50.0070.03314.32
5.3.40.0070.05714.38
5.3.30.0030.03714.29
5.3.20.0030.03713.95
5.3.10.0070.03314.07
5.3.00.0000.07014.07
5.2.170.0000.03311.13
5.2.160.0030.04010.94
5.2.150.0000.05311.11
5.2.140.0070.03311.00
5.2.130.0000.03010.94
5.2.120.0030.03711.10
5.2.110.0100.03711.10
5.2.100.0030.04011.06
5.2.90.0000.05710.95
5.2.80.0000.05011.05
5.2.70.0000.04311.16
5.2.60.0030.05710.84
5.2.50.0000.06310.97
5.2.40.0130.05310.91
5.2.30.0100.06011.04
5.2.20.0070.06010.83
5.2.10.0100.05310.72
5.2.00.0070.06010.77
5.1.60.0070.0379.98
5.1.50.0030.05710.07
5.1.40.0070.0339.99
5.1.30.0070.05010.29
5.1.20.0030.05310.27
5.1.10.0070.05310.07
5.1.00.0030.05010.11
5.0.50.0070.0308.72
5.0.40.0000.0438.72
5.0.30.0070.0578.72
5.0.20.0000.0478.72
5.0.10.0030.0478.72
5.0.00.0000.0638.72
4.4.90.0000.0378.72
4.4.80.0030.0308.72
4.4.70.0070.0338.72
4.4.60.0000.0378.72
4.4.50.0000.0378.72
4.4.40.0070.0508.72
4.4.30.0030.0308.72
4.4.20.0030.0308.72
4.4.10.0030.0338.72
4.4.00.0130.0478.72
4.3.110.0100.0238.72
4.3.100.0000.0338.72
4.3.90.0070.0308.72
4.3.80.0100.0438.72
4.3.70.0100.0238.72
4.3.60.0000.0378.72
4.3.50.0070.0278.72
4.3.40.0030.0408.72
4.3.30.0000.0378.72
4.3.20.0000.0338.72
4.3.10.0070.0308.72
4.3.00.0030.0208.72

preferences:
55.98 ms | 400 KiB | 5 Q