3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Generate the md5 hash of a randomized uniq id $hash = md5(uniqid(rand(), true)); // Select a random number between 1 and 24 (32-8) $n = rand(1, 24); // Generate the token retrieving a part of the hash starting from // the random N number with 8 of lenght $token = substr($hash, $n, 8); echo $token;

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.0160.00315.94
7.3.00.0070.01015.96
7.2.130.0100.00716.22
7.2.120.0110.00616.49
7.2.110.0160.00616.29
7.2.100.0040.01416.26
7.2.90.0150.00616.26
7.2.80.0100.01016.42
7.2.70.0190.00316.36
7.2.60.0120.00416.32
7.2.50.0120.00816.49
7.2.40.0130.00716.54
7.2.30.0090.00916.49
7.2.20.0110.00716.26
7.2.10.0130.01316.47
7.2.00.0060.00917.80
7.1.250.0140.00415.66
7.1.70.0080.00017.03
7.1.60.0040.00716.98
7.1.50.0000.01416.63
7.1.00.0030.07322.51
7.0.200.0060.00916.79
7.0.140.0000.07721.95
7.0.80.0430.06719.91
7.0.70.0400.07719.91
7.0.60.0430.08720.02
7.0.50.0500.09020.34
7.0.40.0130.06019.91
7.0.30.0100.09020.01
7.0.20.0100.08720.06
7.0.10.0170.07020.16
7.0.00.0030.04720.14
5.6.280.0070.07021.02
5.6.230.0170.07320.63
5.6.220.0130.08320.57
5.6.210.0000.08320.55
5.6.200.0130.07321.00
5.6.190.0100.08321.03
5.6.180.0070.08721.01
5.6.170.0070.08720.94
5.6.160.0170.07020.95
5.6.150.0100.05021.17
5.6.140.0100.08321.02
5.6.130.0130.08021.10
5.6.120.0100.08320.92
5.6.110.0170.08020.95
5.6.100.0100.08021.08
5.6.90.0200.06721.01
5.6.80.0030.07320.43
5.6.70.0200.06320.47
5.6.60.0000.08320.47
5.6.50.0000.08720.27
5.6.40.0070.05320.39
5.6.30.0070.07320.48
5.6.20.0130.07320.37
5.6.10.0130.07020.37
5.6.00.0070.07020.38
5.5.370.0130.07720.43
5.5.360.0030.09320.49
5.5.350.0030.05320.47
5.5.340.0070.08320.75
5.5.330.0070.04720.91
5.5.320.0100.08320.78
5.5.310.0100.05020.77
5.5.300.0130.07020.75
5.5.290.0130.07320.82
5.5.280.0070.08720.82
5.5.270.0130.07320.80
5.5.260.0100.08320.74
5.5.250.0030.08320.58
5.5.240.0170.06720.26
5.5.230.0070.08020.20
5.5.220.0030.08020.27
5.5.210.0030.07320.16
5.5.200.0170.07020.08
5.5.190.0130.05020.10
5.5.180.0070.05720.25
5.5.160.0170.06720.24
5.5.150.0000.04720.20
5.5.140.0130.04719.98
5.5.130.0100.03020.11
5.5.120.0000.06020.13
5.5.110.0130.07720.25
5.5.100.0130.06720.13
5.5.90.0100.07719.96
5.5.80.0170.07020.05
5.5.70.0100.06720.02
5.5.60.0100.05720.13
5.5.50.0070.07719.99
5.5.40.0070.06320.14
5.5.30.0000.08320.07
5.5.20.0100.09020.13
5.5.10.0100.07320.02
5.5.00.0070.07719.90
5.4.450.0100.07019.39
5.4.440.0030.08319.46
5.4.430.0030.08719.30
5.4.420.0100.07719.46
5.4.410.0070.05719.31
5.4.400.0100.06019.07
5.4.390.0030.07718.90
5.4.380.0030.08018.98
5.4.370.0130.04319.11
5.4.360.0100.07719.23
5.4.350.0000.08719.12
5.4.340.0130.07019.10
5.4.320.0030.08019.11
5.4.310.0000.04719.23
5.4.300.0100.03719.14
5.4.290.0100.05019.12
5.4.280.0000.07318.97
5.4.270.0070.07019.02
5.4.260.0000.04019.05
5.4.250.0100.05719.09
5.4.240.0100.06019.11
5.4.230.0030.07019.02
5.4.220.0100.07318.97
5.4.210.0130.07018.84
5.4.200.0100.06319.11
5.4.190.0030.07019.11
5.4.180.0130.06318.97
5.4.170.0070.06719.23
5.4.160.0170.05019.08
5.4.150.0030.05319.07
5.4.140.0130.07016.13
5.4.130.0130.06716.28
5.4.120.0030.07316.32
5.4.110.0130.09316.23
5.4.100.0070.05016.30
5.4.90.0000.04016.25
5.4.80.0130.05316.19
5.4.70.0100.04716.33
5.4.60.0100.05016.19
5.4.50.0130.04716.26
5.4.40.0070.03716.33
5.4.30.0130.06716.18
5.4.20.0030.06316.20
5.4.10.0200.06716.37
5.4.00.0100.07015.56
5.3.290.0070.06314.67
5.3.280.0100.06314.54
5.3.270.0030.05014.48
5.3.260.0170.06714.54
5.3.250.0100.07014.61
5.3.240.0170.04314.46
5.3.230.0100.07314.59
5.3.220.0130.05314.40
5.3.210.0070.07714.39
5.3.200.0070.04014.47
5.3.190.0070.07714.39
5.3.180.0070.07314.55
5.3.170.0100.06314.55
5.3.160.0030.08014.57
5.3.150.0130.06314.41
5.3.140.0030.05014.41
5.3.130.0100.05714.55
5.3.120.0070.08014.52
5.3.110.0070.07714.48
5.3.100.0130.07013.89
5.3.90.0130.06713.95
5.3.80.0130.06713.87
5.3.70.0100.06713.86
5.3.60.0070.05713.99
5.3.50.0000.08013.71
5.3.40.0070.05713.93
5.3.30.0130.06313.89
5.3.20.0070.06713.64
5.3.10.0070.06013.61
5.3.00.0030.06313.61
5.2.170.0030.05711.50
5.2.160.0100.04011.50
5.2.150.0100.02711.50
5.2.140.0070.05311.50
5.2.130.0030.06011.50
5.2.120.0030.06011.50
5.2.110.0030.03011.50
5.2.100.0000.05711.50
5.2.90.0030.04011.50
5.2.80.0100.05711.50
5.2.70.0070.06311.50
5.2.60.0100.04311.50
5.2.50.0030.05011.50
5.2.40.0030.05011.50
5.2.30.0030.05711.50
5.2.20.0030.03011.50
5.2.10.0030.06711.50
5.2.00.0070.04711.50
5.1.60.0070.02711.50
5.1.50.0100.03011.50
5.1.40.0000.04311.50
5.1.30.0030.04311.50
5.1.20.0070.04311.50
5.1.10.0000.05011.50
5.1.00.0070.05011.50
5.0.50.0000.04311.50
5.0.40.0030.04311.50
5.0.30.0000.07011.50
5.0.20.0000.03311.50
5.0.10.0030.04311.50
5.0.00.0030.06011.50
4.4.90.0000.03711.50
4.4.80.0000.02311.50
4.4.70.0030.03311.50
4.4.60.0030.03311.50
4.4.50.0000.03011.50
4.4.40.0030.04711.50
4.4.30.0030.01711.50
4.4.20.0030.03711.50
4.4.10.0030.02711.50
4.4.00.0030.04011.50
4.3.110.0070.03011.50
4.3.100.0000.03011.50
4.3.90.0070.02711.50
4.3.80.0000.05311.50
4.3.70.0030.03011.50
4.3.60.0030.02711.50
4.3.50.0030.03311.50
4.3.40.0000.05011.50
4.3.30.0030.03711.50
4.3.20.0000.02711.50
4.3.10.0030.03311.50
4.3.00.0030.03011.50

preferences:
39.92 ms | 401 KiB | 5 Q