3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { $foo = array(); for($x = 0; $x < 100000; $x++){ $foo[] = rand(); } return $foo; } $t = microtime(true); foreach(foo() as $val){ $val = $val + 2; } echo round(microtime(true) - $t, 5)."\n"; $t = microtime(true); $foo = foo(); foreach($foo as $val){ $val = $val + 2; } echo round(microtime(true) - $t, 5)."\n";

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.3.10.0330.01622.43
7.3.00.0030.02322.53
7.2.130.0220.01622.94
7.2.120.0250.01922.55
7.2.110.0220.02223.05
7.2.100.0310.01222.79
7.2.90.0430.02122.89
7.2.80.0360.02722.91
7.2.70.0620.00922.64
7.2.60.0340.02022.63
7.2.50.0380.02522.77
7.2.40.0490.01222.77
7.2.30.0320.02122.65
7.2.20.0580.02322.85
7.2.10.0660.00722.73
7.2.00.0150.02223.86
7.1.250.0240.03121.89
7.1.70.0000.02122.86
7.1.60.0070.03623.47
7.1.50.0040.03923.15
7.1.00.0100.08328.28
7.0.200.0100.02622.51
7.0.140.0000.08728.00
7.0.100.0500.05324.78
7.0.90.0870.08724.80
7.0.80.0100.05724.70
7.0.70.0570.10324.74
7.0.60.0370.10724.60
7.0.50.0370.08025.23
7.0.40.0300.08024.00
7.0.30.0270.10024.03
7.0.20.0170.10024.01
7.0.10.0100.08323.81
7.0.00.0200.09023.91
5.6.280.0200.12735.19
5.6.250.0200.13334.71
5.6.240.0430.13734.67
5.6.230.0030.16034.66
5.6.220.0400.11334.54
5.6.210.0170.10034.65
5.6.200.0170.14035.21
5.6.190.0370.15035.07
5.6.180.0270.12335.14
5.6.170.0270.13335.00
5.6.160.0300.12034.97
5.6.150.0270.12035.16
5.6.140.0170.14335.11
5.6.130.0200.11335.09
5.6.120.0170.13335.03
5.6.110.0130.14035.08
5.6.100.0230.13034.99
5.6.90.0270.13734.98
5.6.80.0230.10734.56
5.6.70.0130.13034.36
5.6.60.0230.12034.35
5.6.50.0170.09034.42
5.6.40.0200.09734.48
5.6.30.0170.15334.35
5.6.20.0230.11334.47
5.6.10.0130.11034.40
5.6.00.0270.11334.55
5.5.380.0100.11034.37
5.5.370.0230.10334.48
5.5.360.0200.12034.42
5.5.350.0170.10734.41
5.5.340.0200.13034.85
5.5.330.0300.11734.78
5.5.320.0200.10034.93
5.5.310.0200.15734.96
5.5.300.0270.12334.96
5.5.290.0230.12034.93
5.5.280.0130.12734.88
5.5.270.0170.14734.89
5.5.260.0100.10334.87
5.5.250.0200.13334.71
5.5.240.0270.13034.21
5.5.230.0170.13734.26
5.5.220.0200.12334.14
5.5.210.0170.09734.30
5.5.200.0270.10734.14
5.5.190.0100.12034.20
5.5.180.0170.11734.30
5.5.160.0300.12334.32
5.5.150.0230.07334.30
5.5.140.0170.12734.25
5.5.130.0200.09734.22
5.5.120.0330.12734.25
5.5.110.0270.09734.30
5.5.100.0130.12034.03
5.5.90.0200.12734.14
5.5.80.0200.13334.19
5.5.70.0100.09334.07
5.5.60.0130.12734.14
5.5.50.0200.11734.10
5.5.40.0100.13734.09
5.5.30.0170.12734.10
5.5.20.0100.13734.19
5.5.10.0230.09734.16
5.5.00.0230.13034.16
5.4.450.0200.12333.41
5.4.440.0130.14333.30
5.4.430.0130.12733.18
5.4.420.0230.12033.34
5.4.410.0200.13333.34
5.4.400.0170.11032.98
5.4.390.0170.12332.99
5.4.380.0130.12332.97
5.4.370.0230.13032.93
5.4.360.0270.09033.04
5.4.350.0170.10332.82
5.4.340.0200.11733.03
5.4.320.0300.11033.00
5.4.310.0170.14032.93
5.4.300.0170.12732.84
5.4.290.0130.13032.86
5.4.280.0230.12733.03
5.4.270.0100.15033.03
5.4.260.0230.10732.86
5.4.250.0130.14732.96
5.4.240.0270.14033.08
5.4.230.0100.13332.82
5.4.220.0200.11332.86
5.4.210.0170.12333.21
5.4.200.0030.12733.18
5.4.190.0130.13733.07
5.4.180.0170.12033.18
5.4.170.0230.12333.05
5.4.160.0070.13732.81
5.4.150.0100.13033.00
5.4.140.0070.12730.26
5.4.130.0130.13730.46
5.4.120.0130.11330.42
5.4.110.0100.12330.31
5.4.100.0170.13030.53
5.4.90.0170.11330.34
5.4.80.0270.10730.50
5.4.70.0330.11030.32
5.4.60.0100.12030.39
5.4.50.0100.13030.32
5.4.40.0200.09730.35
5.4.30.0200.13030.37
5.4.20.0100.10330.33
5.4.10.0230.09330.32
5.4.00.0130.13329.76
5.3.290.0130.12329.25
5.3.280.0100.12729.19
5.3.270.0100.12729.14
5.3.260.0100.13729.19
5.3.250.0200.12729.15
5.3.240.0070.10329.29
5.3.230.0230.12029.27
5.3.220.0200.14029.11
5.3.210.0170.14029.14
5.3.200.0270.11329.13
5.3.190.0130.14029.16
5.3.180.0130.12729.13
5.3.170.0030.13329.09
5.3.160.0200.12329.12
5.3.150.0170.13329.25
5.3.140.0130.13329.10
5.3.130.0030.10329.09
5.3.120.0170.10329.05
5.3.110.0100.12329.08
5.3.100.0200.09728.61
5.3.90.0130.14028.55
5.3.80.0170.12028.59
5.3.70.0130.13728.58
5.3.60.0130.08028.62
5.3.50.0200.12728.46
5.3.40.0130.13028.46
5.3.30.0230.10028.59
5.3.20.0130.09728.52
5.3.10.0170.09028.30
5.3.00.0070.13028.12
5.2.170.0200.14024.32
5.2.160.0130.12724.43
5.2.150.0100.12324.27
5.2.140.0130.12724.33
5.2.130.0130.14724.27
5.2.120.0170.13024.48
5.2.110.0000.13324.40
5.2.100.0170.12724.38
5.2.90.0130.10024.28
5.2.80.0330.10324.20
5.2.70.0170.11724.32
5.2.60.0130.08324.37
5.2.50.0230.12024.27
5.2.40.0170.13724.25
5.2.30.0200.13324.14
5.2.20.0200.15024.16
5.2.10.0200.13323.95
5.2.00.0100.12323.92
5.1.60.0200.14327.90
5.1.50.0100.13727.89
5.1.40.0000.15027.97
5.1.30.0170.14728.15
5.1.20.0270.12028.37
5.1.10.0200.14028.09
5.1.00.0230.10728.10
5.0.50.0130.17726.48
5.0.40.0100.18326.44
5.0.30.0130.16726.27
5.0.20.0170.18326.09
5.0.10.0200.19326.13
5.0.00.0200.18326.21
4.4.90.0100.21023.85
4.4.80.0100.17323.80
4.4.70.0170.15723.84
4.4.60.0030.12723.76
4.4.50.0330.12323.73
4.4.40.0170.14323.76
4.4.30.0000.12023.81
4.4.20.0130.16324.07
4.4.10.0100.16723.79
4.4.00.0170.16323.83
4.3.110.0070.16323.71
4.3.100.0270.13723.74
4.3.90.0130.17023.75
4.3.80.0070.18023.67
4.3.70.0200.19723.70
4.3.60.0030.20023.72
4.3.50.0070.20023.59
4.3.40.0070.15023.64
4.3.30.0100.17722.47
4.3.20.0100.41022.47
4.3.10.0100.39722.45
4.3.00.0130.36322.38

preferences:
45.51 ms | 401 KiB | 5 Q