3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = base64_encode(md5('')); $start = microtime(true); for ($i = 0; $i < 100; ++$i) { $soFar = ''; $result = []; foreach (str_split($value) as $char) { $soFar .= $char; $result[] = $soFar; } } $end = microtime(true); echo $i/($end - $start), ' op/s'; var_dump($result);

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.0050.00519.17
7.1.70.0040.00417.30
7.1.60.0110.01419.82
7.1.50.0170.00717.02
7.1.00.0030.07722.43
7.0.200.0030.00516.93
7.0.140.0130.06722.05
7.0.60.0030.07319.86
7.0.50.0030.04017.81
7.0.40.0130.08019.96
7.0.30.0670.06320.02
7.0.20.0100.05320.11
7.0.10.0300.08020.09
7.0.00.0170.03320.19
5.6.280.0030.09320.89
5.6.210.0030.07720.74
5.6.200.0200.03718.22
5.6.190.0030.10020.35
5.6.180.3800.04720.64
5.6.170.0300.06020.38
5.6.160.0030.08020.50
5.6.150.0170.06318.12
5.6.140.0000.04318.21
5.6.130.0070.08718.18
5.6.120.0100.07320.99
5.6.110.0200.07321.08
5.6.100.0030.04320.98
5.6.90.0100.04020.99
5.6.80.0170.07320.40
5.6.70.3730.03320.52
5.5.350.0230.08020.46
5.5.340.0070.08017.91
5.5.330.0100.08020.28
5.5.320.0470.06720.17
5.5.310.0330.07020.32
5.5.300.0170.07318.02
5.5.290.0100.06717.98
5.5.280.0030.07720.84
5.5.270.0070.03720.71
5.5.260.0000.04320.84
5.5.250.0030.04720.58
5.5.240.0030.06720.16
5.4.450.0300.04019.27
5.4.440.0230.06719.27
5.4.430.0130.05719.30
5.4.420.0170.06019.51
5.4.410.0130.05319.36
5.4.400.1200.00018.72
5.4.390.1130.00018.48
5.4.380.0230.05718.56
5.4.370.0430.04718.71
5.4.360.0200.05718.60
5.4.350.0330.04718.58
5.4.340.0170.05318.61
5.4.320.0080.03612.47
5.4.310.0130.03712.46
5.4.300.0050.03812.47
5.4.290.0060.04112.47
5.4.280.0050.03712.37
5.4.270.0070.04312.37
5.4.260.0070.05318.94
5.4.250.0000.06018.66
5.4.240.0030.06318.89
5.4.230.0100.07718.89
5.4.220.0170.04718.77
5.4.210.0070.05318.73
5.4.200.0000.06018.89
5.4.190.0200.04718.89
5.4.180.0200.05318.83
5.4.170.0070.05318.64
5.4.160.0100.07718.82
5.4.150.0170.07318.90
5.4.140.0130.05316.46
5.4.130.0070.05316.23
5.4.120.0130.04316.48
5.4.110.0070.05716.48
5.4.100.0100.06316.23
5.4.90.0070.04716.25
5.4.80.0200.03716.48
5.4.70.0070.06716.35
5.4.60.0170.04316.21
5.4.50.0070.05316.39
5.4.40.0000.05716.51
5.4.30.0100.04716.20
5.4.20.0100.04716.39
5.4.10.0170.04716.26
5.4.00.0000.05715.91
5.3.290.0050.04012.80
5.3.280.0070.05014.38
5.3.270.0130.04714.70
5.3.260.0200.04014.61
5.3.250.0030.05714.48
5.3.240.0070.06014.65
5.3.230.0100.04714.61
5.3.220.0030.05314.41
5.3.210.0070.05314.27
5.3.200.0000.05314.62
5.3.190.0030.05314.66
5.3.180.0100.06014.57
5.3.170.0130.06314.58
5.3.160.0030.05014.27
5.3.150.0100.05014.61
5.3.140.0130.04314.58
5.3.130.0030.07314.56
5.3.120.0030.05714.58
5.3.110.0100.05014.32
5.3.100.0100.05013.74
5.3.90.0030.05014.17
5.3.80.0030.05314.19
5.3.70.0100.04313.86
5.3.60.0130.04314.09
5.3.50.0100.04713.80
5.3.40.0130.05313.97
5.3.30.0030.05713.75
5.3.20.0030.05013.61
5.3.10.0030.05713.59
5.3.00.0130.07013.79
5.2.170.0170.03311.15
5.2.160.0000.04311.06
5.2.150.0000.05311.14
5.2.140.0100.04311.03
5.2.130.0000.04311.12
5.2.120.0100.04011.02
5.2.110.0100.03311.02
5.2.100.0030.05010.99
5.2.90.0170.03011.25
5.2.80.0100.05710.92
5.2.70.0030.04311.10
5.2.60.0130.05010.97
5.2.50.0100.03711.04
5.2.40.0070.04311.02
5.2.30.0070.03710.98
5.2.20.0070.04010.96
5.2.10.0070.03711.07
5.2.00.0030.04010.48
5.1.60.0030.0339.96
5.1.50.0070.0309.92
5.1.40.0000.0409.98
5.1.30.0100.03010.39
5.1.20.0070.03710.41
5.1.10.0100.0309.95
5.1.00.0030.03710.03
5.0.50.0000.0308.74
5.0.40.0070.0238.46
5.0.30.0100.0378.14
5.0.20.0100.0308.18
5.0.10.0070.0278.21
5.0.00.0070.0437.99
4.4.90.0030.0206.77
4.4.80.0000.0306.77
4.4.70.0070.0176.77
4.4.60.0000.0236.77
4.4.50.0030.0206.77
4.4.40.0070.0306.77
4.4.30.0000.0236.77
4.4.20.0070.0236.77
4.4.10.0030.0236.77
4.4.00.0070.0306.77
4.3.110.0070.0236.77
4.3.100.0030.0206.77
4.3.90.0000.0236.77
4.3.80.0030.0376.77
4.3.70.0070.0206.77
4.3.60.0070.0176.77
4.3.50.0070.0176.77
4.3.40.0030.0406.77
4.3.30.0000.0236.77
4.3.20.0000.0236.77
4.3.10.0070.0206.77
4.3.00.0200.01314.48

preferences:
33.88 ms | 401 KiB | 5 Q