3v4l.org

run code in 300+ PHP versions simultaneously
<?php function uuid($c = 4) { $x4 = function($c) { for ($n = ''; strlen($n) < $c + 1; $n = $n.mt_rand()); return substr($n, -$c); }; return sprintf( '%s-%04d-%04d-%04d-%04d%04d%04d', time(), $x($c), $x($c), $x($c), $x($c), $x($c), $x($c), $x($c) ); } echo uuid();

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.0150.00319.01
7.1.70.0070.00317.20
7.1.60.0060.00617.15
7.1.50.0060.01216.98
7.1.00.0000.08022.48
7.0.200.0030.01216.33
7.0.140.0030.07322.18
7.0.90.0000.05319.97
7.0.80.0470.06720.07
7.0.70.0270.08019.84
7.0.60.0470.04019.82
7.0.50.0400.06020.16
7.0.40.0070.06720.13
7.0.30.0270.06020.09
7.0.20.0170.05720.03
7.0.10.0100.04720.10
7.0.00.0130.04319.93
5.6.280.0170.05721.16
5.6.240.0170.03720.47
5.6.230.0170.07720.61
5.6.220.0070.07020.63
5.6.210.0030.05720.71
5.6.200.0030.08321.12
5.6.190.0100.06320.95
5.6.180.0070.08321.02
5.6.170.0030.08720.95
5.6.160.0070.07720.97
5.6.150.0000.09021.08
5.6.140.0130.06320.96
5.6.130.0130.07321.02
5.6.120.0200.06321.02
5.6.110.0330.06021.08
5.6.100.0130.07721.00
5.6.90.0170.07320.95
5.6.80.0070.04320.45
5.6.70.0100.08320.44
5.6.60.0030.06720.29
5.6.50.0130.07320.38
5.6.40.0030.04720.48
5.6.30.0030.07720.45
5.6.20.0030.08720.47
5.6.10.0130.04720.32
5.6.00.0100.08020.41
5.5.380.0070.07020.32
5.5.370.0030.08020.45
5.5.360.0070.08720.51
5.5.350.0000.04720.28
5.5.340.0130.07020.93
5.5.330.0070.07720.80
5.5.320.0070.08320.93
5.5.310.0230.06720.88
5.5.300.0070.09320.76
5.5.290.0030.08320.83
5.5.280.0230.04720.76
5.5.270.0130.08020.90
5.5.260.0130.08720.87
5.5.250.0100.08320.46
5.5.240.0070.07320.30
5.5.230.0070.07720.22
5.5.220.0100.07020.15
5.5.210.0100.07320.30
5.5.200.0030.03320.19
5.5.190.0070.05320.14
5.5.180.0100.08020.20
5.5.160.0070.07020.23
5.5.150.0070.06320.24
5.5.140.0000.05320.22
5.5.130.0070.07720.28
5.5.120.0070.05720.22
5.5.110.0000.08020.24
5.5.100.0070.03720.10
5.5.90.0030.05320.07
5.5.80.0000.05020.16
5.5.70.0030.04320.09
5.5.60.0070.03720.14
5.5.50.0100.04320.07
5.5.40.0030.04019.97
5.5.30.0030.03720.15
5.5.20.0030.03319.96
5.5.10.0000.03319.98
5.5.00.0070.04020.02
5.4.450.0070.04719.22
5.4.440.0130.08019.36
5.4.430.0100.05019.52
5.4.420.0100.06319.45
5.4.410.0130.07319.42
5.4.400.0070.05019.13
5.4.390.0100.07718.88
5.4.380.0070.06319.18
5.4.370.0070.04319.09
5.4.360.0070.04319.19
5.4.350.0070.05719.02
5.4.340.0100.07319.13
5.4.320.0100.07318.93
5.4.310.0070.04319.04
5.4.300.0070.04319.02
5.4.290.0030.08319.20
5.4.280.0130.06719.03
5.4.270.0070.06319.04
5.4.260.0070.03718.87
5.4.250.0130.02719.01
5.4.240.0130.02319.01
5.4.230.0100.03019.09
5.4.220.0070.03319.10
5.4.210.0030.04019.20
5.4.200.0030.05019.09
5.4.190.0000.03719.20
5.4.180.0070.03318.86
5.4.170.0100.07719.17
5.4.160.0070.03319.01
5.4.150.0100.05319.19
5.4.140.0030.03716.45
5.4.130.0000.03316.39
5.4.120.0030.03016.42
5.4.110.0000.04016.39
5.4.100.0030.03716.49
5.4.90.0030.04316.44
5.4.80.0030.03016.48
5.4.70.0000.04016.52
5.4.60.0070.03316.28
5.4.50.0070.04016.45
5.4.40.0030.03016.40
5.4.30.0000.03716.36
5.4.20.0000.03716.32
5.4.10.0130.03016.43
5.4.00.0030.03315.79
5.3.290.0030.08314.79
5.3.280.0030.03314.69
5.3.270.0030.07314.66
5.3.260.0100.07014.57
5.3.250.0100.07014.63
5.3.240.0070.06314.70
5.3.230.0030.04014.60
5.3.220.0070.03014.68
5.3.210.0030.03714.63
5.3.200.0030.05714.64
5.3.190.0030.03714.62
5.3.180.0030.05014.58
5.3.170.0000.03714.56
5.3.160.0070.04014.59
5.3.150.0070.07314.67
5.3.140.0070.03314.61
5.3.130.0030.03714.57
5.3.120.0000.03314.47
5.3.110.0000.04014.56
5.3.100.0030.04014.07
5.3.90.0130.02313.99
5.3.80.0070.03314.05
5.3.70.0070.03314.01
5.3.60.0070.04013.91
5.3.50.0030.03713.96
5.3.40.0030.03713.98
5.3.30.0030.04714.02
5.3.20.0100.03013.79
5.3.10.0000.03713.77
5.3.00.0030.03713.78
5.2.170.0000.03011.07
5.2.160.0100.03711.27
5.2.150.0100.02711.02
5.2.140.0000.03311.12
5.2.130.0000.03011.00
5.2.120.0000.03311.25
5.2.110.0000.03011.11
5.2.100.0030.03310.96
5.2.90.0130.02011.21
5.2.80.0000.02711.18
5.2.70.0000.02711.15
5.2.60.0000.03311.12
5.2.50.0000.04711.00
5.2.40.0000.03311.05
5.2.30.0000.03011.06
5.2.20.0070.02011.02
5.2.10.0000.06010.79
5.2.00.0030.05310.73
5.1.60.0030.04010.40
5.1.50.0030.04310.40
5.1.40.0000.05010.40
5.1.30.0030.06010.40
5.1.20.0070.05310.40
5.1.10.0030.05310.40
5.1.00.0070.05010.40
5.0.50.0130.01710.40
5.0.40.0070.02710.40
5.0.30.0070.05310.40
5.0.20.0030.03010.40
5.0.10.0030.02010.40
5.0.00.0000.05710.40
4.4.90.0030.02310.40
4.4.80.0030.01310.40
4.4.70.0030.02310.40
4.4.60.0000.02310.40
4.4.50.0000.02310.40
4.4.40.0000.04310.40
4.4.30.0030.03310.40
4.4.20.0030.03310.40
4.4.10.0030.03310.40
4.4.00.0030.03010.40
4.3.110.0000.02010.40
4.3.100.0100.02710.40
4.3.90.0000.02010.40
4.3.80.0030.02710.40
4.3.70.0030.03710.40
4.3.60.0000.01710.40
4.3.50.0070.02310.40
4.3.40.0000.05310.40
4.3.30.0030.03010.40
4.3.20.0000.02010.40
4.3.10.0000.02010.40
4.3.00.0000.01710.40

preferences:
41.3 ms | 403 KiB | 5 Q