3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(1,1000000); $t = microtime(true); foreach($a as $e) { $b = $e; } $t -= microtime(true); echo 'foreach time: ', $t, PHP_EOL; $t = microtime(true); array_walk($a, function($e) { $b = $e; }); $t -= microtime(true); echo 'array_walk time: ', $t, PHP_EOL; $t = microtime(true); array_map(function($e) { $b = $e; }, $a); $t -= microtime(true); echo 'Array_map time: ', $t, 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.0370.17474.44
7.3.120.0290.09168.18
7.3.110.0600.14367.71
7.3.100.0260.10968.26
7.3.90.0360.10367.53
7.3.80.0270.09567.70
7.3.70.0210.10567.61
7.3.60.0340.10968.26
7.3.50.0500.07667.60
7.3.40.0360.10867.83
7.3.30.0370.08767.96
7.3.20.0320.09570.11
7.3.10.0510.10469.97
7.3.00.2530.09669.49
7.2.250.0530.09068.36
7.2.240.0440.16868.03
7.2.230.0340.13068.09
7.2.220.0370.09268.08
7.2.210.0240.10367.97
7.2.200.0340.09968.45
7.2.190.0410.08668.46
7.2.180.0340.09868.06
7.2.170.0320.11168.30
7.2.130.3300.09569.43
7.2.120.4420.09770.40
7.2.110.3950.09270.39
7.2.100.1020.09670.61
7.2.90.1300.10670.35
7.2.80.1490.09470.31
7.2.70.0920.11270.77
7.2.60.0760.10970.49
7.2.50.0990.09570.58
7.2.40.1010.10870.38
7.2.30.1300.08870.37
7.2.20.0840.10470.38
7.2.10.0890.09170.56
7.2.00.0970.09271.27
7.1.330.0640.14869.26
7.1.320.0330.12269.26
7.1.310.0480.11069.45
7.1.300.0410.11669.30
7.1.290.0520.13269.47
7.1.280.0680.10569.59
7.1.270.0510.12269.65
7.1.260.0410.10769.54
7.1.250.1930.13668.58
7.1.240.8610.12969.38
7.1.230.1580.11669.36
7.1.220.0230.11469.27
7.1.210.0160.11269.43
7.1.200.0660.12569.47
7.1.190.0130.14469.58
7.1.180.0130.13869.48
7.1.170.0200.12769.51
7.1.160.0100.13969.29
7.1.150.0540.13169.46
7.1.140.0100.13269.62
7.1.130.0290.12769.26
7.1.120.0240.12469.48
7.1.110.0200.12469.65
7.1.100.0100.14869.48
7.1.90.0160.14569.47
7.1.80.0190.11769.64
7.1.70.0270.10570.17
7.1.60.0170.13170.45
7.1.50.0170.11970.21
7.1.40.0230.12469.30
7.1.30.0070.13669.30
7.1.20.0160.13069.31
7.1.10.0190.12069.24
7.1.00.0170.14972.92
7.0.330.1820.11945.23
7.0.320.0070.10646.78
7.0.310.0210.11347.21
7.0.300.0200.11047.31
7.0.290.0160.11147.13
7.0.280.0170.12347.15
7.0.270.0100.12847.07
7.0.260.0190.10446.84
7.0.250.0160.10047.39
7.0.240.0260.12747.29
7.0.230.0140.10947.19
7.0.220.0100.11747.07
7.0.210.0170.10347.35
7.0.200.1940.08946.22
7.0.190.0140.10947.39
7.0.180.0230.09747.08
7.0.170.0170.11147.38
7.0.160.0190.09747.25
7.0.150.0040.12047.44
7.0.140.0130.13450.65
7.0.130.0260.09947.35
7.0.120.0130.11747.22
7.0.110.0130.13147.19
7.0.100.0190.11747.28
7.0.90.0220.13846.99
7.0.80.0130.11747.18
7.0.70.0170.10447.27
7.0.60.0240.15148.85
7.0.50.0240.14547.66
7.0.40.0180.13947.76
7.0.30.0450.13447.81
7.0.20.0430.16547.80
7.0.10.0380.14147.71
7.0.00.0210.16647.81
5.6.380.0320.05778.71
5.6.370.0320.05678.73
5.6.360.0410.03478.29
5.6.350.0320.04678.65
5.6.340.0440.03278.47
5.6.330.0300.05178.30
5.6.320.0370.04378.73
5.6.310.0400.03278.50
5.6.300.0290.06078.60
5.6.290.0490.03478.68
5.6.280.0360.08182.41
5.6.270.0330.05278.56
5.6.260.0450.04878.75
5.6.250.0390.06678.92
5.6.240.0430.04678.54
5.6.230.0400.04878.64
5.6.220.0550.03878.44
5.6.210.0440.07782.10
5.6.200.0360.06380.80
5.6.190.0510.06981.90
5.6.180.0480.05581.93
5.6.170.0370.06181.82
5.6.160.0300.06481.78
5.6.150.0370.08580.71
5.6.140.0260.06380.70
5.6.130.0330.08880.92
5.6.120.0350.08582.21
5.6.110.0510.06182.28
5.6.100.0310.08482.33
5.6.90.0390.08482.09
5.6.80.0310.08981.80
5.6.70.0410.04878.77
5.6.60.0440.05978.57
5.6.50.0420.04878.51
5.6.40.0350.07378.55
5.6.30.0250.06478.53
5.6.20.0350.04978.53
5.6.10.0360.04378.71
5.6.00.0390.05278.60
5.5.380.0560.02775.62
5.5.370.0400.04675.59
5.5.360.0470.03775.39
5.5.350.0430.05080.35
5.5.340.0300.06278.96
5.5.330.0350.05580.22
5.5.320.0330.06680.25
5.5.310.0480.06879.92
5.5.300.0250.09479.10
5.5.290.0320.05979.07
5.5.280.0320.08980.43
5.5.270.0400.08080.45
5.5.260.0410.07780.46
5.5.250.0400.07880.40
5.5.240.0320.06580.11
5.5.230.0370.04075.35
5.5.220.0510.03575.42
5.5.210.0340.05475.42
5.5.200.0400.04375.57
5.5.190.0330.04775.43
5.5.180.0380.03875.20
5.5.170.0390.04375.18
5.5.160.0480.03575.51
5.5.150.0320.05575.47
5.5.140.0440.03475.39
5.5.130.0320.04375.46
5.5.120.0350.04175.44
5.5.110.0180.06875.29
5.5.100.0460.03775.55
5.5.90.0500.03875.33
5.5.80.0560.03075.32
5.5.70.0370.03775.01
5.5.60.0140.06474.93
5.5.50.0350.03875.07
5.5.40.0230.04975.29
5.5.30.0300.04375.14
5.5.20.0410.03475.33
5.5.10.0460.03675.04
5.5.00.0240.05275.23
5.4.450.0830.06879.61
5.4.440.0760.08679.74
5.4.430.0790.07179.70
5.4.420.0420.09179.67
5.4.410.0410.07579.52
5.4.400.0370.08379.35
5.4.390.0520.08279.32
5.4.380.0500.06279.46
5.4.370.0370.07179.36
5.4.360.0220.06779.18
5.4.350.0250.05576.03
5.4.340.0340.06176.02
5.4.330.0260.05375.33
5.4.320.0230.06076.27
5.4.310.0310.05876.07
5.4.300.0290.05176.28
5.4.290.0260.05676.21
5.4.280.0320.05076.08
5.4.270.0290.05576.06
5.4.260.0250.06276.27
5.4.250.0280.05376.05
5.4.240.0290.05576.04
5.4.230.0300.07476.02
5.4.220.0300.06076.17
5.4.210.0180.06376.24
5.4.200.0250.05876.05
5.4.190.0290.05776.24
5.4.180.0320.05576.27
5.4.170.0220.06876.22
5.4.160.0250.07276.20
5.4.150.0240.06076.13
5.4.140.0300.05576.11
5.4.130.0260.05476.04
5.4.120.0290.05976.05
5.4.110.0220.07575.96
5.4.100.0300.05576.09
5.4.90.0230.05876.06
5.4.80.0270.05876.07
5.4.70.0270.05576.08
5.4.60.0300.05576.10
5.4.50.0240.05976.00
5.4.40.0240.07176.08
5.4.30.0210.06776.10
5.4.20.0330.05176.08
5.4.10.0320.05476.06
5.4.00.0250.06375.74
5.3.290.0250.05674.76
5.3.280.0280.06174.76
5.3.270.0260.05774.76
5.3.260.0290.06274.81
5.3.250.0240.06574.83
5.3.240.0300.05574.72
5.3.230.0320.05574.73
5.3.220.0200.06274.73
5.3.210.0260.06074.71
5.3.200.0220.05874.74
5.3.190.0260.05874.78
5.3.180.0280.05574.84
5.3.170.0220.06074.82
5.3.160.0260.05974.71
5.3.150.0300.06174.69
5.3.140.0260.06774.77
5.3.130.0290.05774.77
5.3.120.0270.05574.80
5.3.110.0280.06374.78
5.3.100.0240.06074.48
5.3.90.0270.06374.49
5.3.80.0250.06874.36
5.3.70.0280.06474.28
5.3.60.0280.05474.33
5.3.50.0260.05774.39
5.3.40.0210.06074.28
5.3.30.0280.05874.38
5.3.20.0210.06474.28
5.3.10.0320.04974.13
5.3.00.0240.05474.09
5.2.170.0050.01810.18
5.2.160.0060.01910.18
5.2.150.0090.01910.18
5.2.140.0020.02610.18
5.2.130.0090.02010.16
5.2.120.0050.01910.16
5.2.110.0060.02210.16
5.2.100.0070.01610.16
5.2.90.0080.02110.16
5.2.80.0030.02110.16
5.2.70.0050.01910.16
5.2.60.0060.01610.13
5.2.50.0050.01710.12
5.2.40.0030.01810.11
5.2.30.0060.01610.10
5.2.20.0070.01410.09
5.2.10.0050.01410.05
5.2.00.0030.0189.98
5.1.60.0030.0149.62
5.1.50.0050.0139.62
5.1.40.0050.0129.61
5.1.30.0050.0159.79
5.1.20.0040.0179.80
5.1.10.0040.0169.66
5.1.00.0020.0159.66
5.0.50.0050.0168.90
5.0.40.0060.0138.83
5.0.30.0030.0188.74
5.0.20.0030.0118.72
5.0.10.0050.0148.71
5.0.00.0050.0208.71
4.4.90.0030.0187.98
4.4.80.0050.0097.96
4.4.70.0030.0117.97
4.4.60.0010.0147.96
4.4.50.0050.0137.97
4.4.40.0020.0167.94
4.4.30.0020.0107.97
4.4.20.0020.0118.01
4.4.10.0040.0098.01
4.4.00.0050.0137.97
4.3.110.0040.0117.92
4.3.100.0030.0147.92
4.3.90.0060.0147.90
4.3.80.0020.0177.88
4.3.70.0010.0167.90
4.3.60.0030.0097.90
4.3.50.0050.0097.90
4.3.40.0030.0157.86
4.3.30.0010.0167.23
4.3.20.0040.0107.22
4.3.10.0040.0097.20
4.3.00.0070.0139.10

preferences:
35.72 ms | 400 KiB | 5 Q