3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rand_str($length = 8, $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890') { $chars_length = (strlen($chars) - 1); $string = $chars{rand(0, $chars_length)}; for ($i = 1; $i < $length; $i = strlen($string)) { $r = $chars{rand(0, $chars_length)}; if ($r != $string{$i - 1}) { $string .= $r; } } return $string; }

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.01319.23
7.1.70.0040.00416.62
7.1.60.0030.02019.82
7.1.50.0190.00616.89
7.1.00.0100.07022.35
7.0.200.0150.00016.56
7.0.140.0000.07721.92
7.0.60.0070.04319.83
7.0.50.0000.04317.82
7.0.40.0170.07320.24
7.0.30.0670.06020.08
7.0.20.0170.04720.07
7.0.10.0300.08020.07
7.0.00.0070.05020.05
5.6.280.0100.06720.93
5.6.210.0100.05320.46
5.6.200.0100.07718.14
5.6.190.0030.05320.50
5.6.180.0330.04720.46
5.6.170.0370.05320.52
5.6.160.0030.08720.51
5.6.150.0030.08018.15
5.6.140.0070.08018.15
5.6.130.0000.07718.15
5.6.120.0030.04320.98
5.6.110.0030.08321.14
5.6.100.0070.04021.12
5.6.90.0030.08320.98
5.6.80.0170.06720.44
5.6.70.0170.03320.40
5.5.350.0330.06020.44
5.5.340.0030.05017.99
5.5.330.0130.07720.57
5.5.320.0200.04720.41
5.5.310.0270.07720.42
5.5.300.0130.03018.07
5.5.290.0130.03317.98
5.5.280.0000.07720.77
5.5.270.0030.04020.68
5.5.260.0070.08320.84
5.5.250.0200.06320.60
5.5.240.0030.08020.16
5.4.450.0730.05319.57
5.4.440.0600.05319.46
5.4.430.0800.05719.31
5.4.420.0870.04319.48
5.4.410.0270.04018.81
5.4.400.0030.05718.77
5.4.390.0030.05718.75
5.4.380.0330.04718.59
5.4.370.0300.03718.70
5.4.360.0200.05318.84
5.4.350.0270.04718.77
5.4.340.0200.05018.69
5.4.320.0050.03712.51
5.4.310.0050.04612.50
5.4.300.0060.03612.50
5.4.290.0050.03812.50
5.4.280.0030.03712.39
5.4.270.0130.05718.83
5.4.260.0200.06719.10
5.4.250.0100.08018.83
5.4.240.0100.06018.98
5.4.230.0230.06018.94
5.4.220.0270.06019.09
5.4.210.0170.07318.98
5.4.200.0170.05318.80
5.4.190.0200.05719.01
5.4.180.0030.06719.04
5.4.170.0130.05719.13
5.4.160.0170.05718.90
5.4.150.0070.07018.90
5.4.140.0130.06016.40
5.4.130.0100.05316.69
5.4.120.0030.06316.54
5.4.110.0070.06016.48
5.4.100.0100.06716.60
5.4.90.0000.05716.57
5.4.80.0230.04316.53
5.4.70.0100.05316.47
5.4.60.0100.06016.48
5.4.50.0100.05316.40
5.4.40.0100.05016.45
5.4.30.0070.05716.43
5.4.20.0170.06316.61
5.4.10.0170.06716.65
5.4.00.0000.07015.85
5.3.290.0070.03812.80
5.3.280.0070.05314.77
5.3.270.0130.07314.72
5.3.260.0130.05014.60
5.3.250.0100.07014.60
5.3.240.0100.05714.91
5.3.230.0170.06014.59
5.3.220.0230.05314.79
5.3.210.0130.06714.75
5.3.200.0200.06014.75
5.3.190.0070.06714.85
5.3.180.0130.04714.78
5.3.170.0130.05314.74
5.3.160.0170.06314.82
5.3.150.0100.05014.70
5.3.140.0100.06014.61
5.3.130.0100.07314.67
5.3.120.0130.05314.43
5.3.110.0230.06014.54
5.3.100.0030.06314.31
5.3.90.0030.05314.20
5.3.80.0130.07014.02
5.3.70.0130.06014.28
5.3.60.0100.06714.28
5.3.50.0070.06713.94
5.3.40.0100.06314.13
5.3.30.0130.07013.95
5.3.20.0030.05313.89
5.3.10.0070.07013.95
5.3.00.0070.06013.86
5.2.170.0070.05311.43
5.2.160.0070.05311.34
5.2.150.0130.05011.10
5.2.140.0000.05711.25
5.2.130.0130.03710.98
5.2.120.0070.05311.21
5.2.110.0100.05711.09
5.2.100.0070.04311.14
5.2.90.0000.06311.15
5.2.80.0030.05311.27
5.2.70.0000.04710.97
5.2.60.0070.05311.11
5.2.50.0100.04011.24
5.2.40.0100.03711.05
5.2.30.0070.05011.08
5.2.20.0170.03011.13
5.2.10.0030.05310.97
5.2.00.0100.03310.98
5.1.60.0100.03710.25
5.1.50.0030.04010.18
5.1.40.0000.0509.96
5.1.30.0100.04710.56
5.1.20.0100.04710.57
5.1.10.0170.03310.27
5.1.00.0030.05310.14
5.0.50.0000.0438.75
5.0.40.0030.0308.50
5.0.30.0030.0438.46
5.0.20.0000.0408.29
5.0.10.0100.0338.38
5.0.00.0070.0538.04
4.4.90.0030.0236.24
4.4.80.0130.0206.21
4.4.70.0100.0176.16
4.4.60.0000.0306.16
4.4.50.0000.0336.16
4.4.40.0070.0376.16
4.4.30.0030.0236.16
4.4.20.0030.0306.16
4.4.10.0100.0236.16
4.4.00.0030.0376.16
4.3.110.0000.0306.16
4.3.100.0000.0276.16
4.3.90.0030.0276.16
4.3.80.0000.0406.16
4.3.70.0030.0206.16
4.3.60.0170.0176.27
4.3.50.0100.0276.27
4.3.40.0000.0336.27
4.3.30.0030.0206.27
4.3.20.0000.0306.27
4.3.10.0030.0236.27
4.3.00.0100.02015.58

preferences:
33.87 ms | 400 KiB | 5 Q