3v4l.org

run code in 300+ PHP versions simultaneously
<?php function uuid($c = 4) { $x = 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) ); } $uuids = array(); for ($i = 0; $i < 10000; $i++) { $uuids[] = uuid(); } if (count(array_unique($uuids)) != count($uuids)) { echo 'DUPLICATE'; } else { echo 'No duplicate'; }

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.4.10.0070.05818.94
7.4.00.0100.05519.05
7.3.130.0100.05518.98
7.3.120.0070.05818.87
7.3.110.0100.04318.74
7.3.100.0060.04218.60
7.3.90.0060.05918.99
7.3.80.0030.04118.80
7.3.70.0060.04218.71
7.3.60.0130.02818.97
7.3.50.0030.03418.93
7.3.40.0000.04018.89
7.3.30.0030.03418.77
7.3.20.0000.04120.78
7.3.10.0030.04720.57
7.3.00.0070.03520.69
7.2.260.0030.05319.20
7.2.250.0160.05218.68
7.2.240.0140.03818.93
7.2.230.0070.04318.95
7.2.220.0070.06218.71
7.2.210.0100.03918.97
7.2.200.0100.04519.00
7.2.190.0070.03518.99
7.2.180.0030.04318.93
7.2.170.0070.04219.04
7.2.160.0070.04619.05
7.2.150.0030.04320.86
7.2.140.0070.04320.75
7.2.130.0080.04320.78
7.2.120.0100.03520.96
7.2.110.0050.04520.98
7.2.100.0080.03620.92
7.2.90.0060.03820.90
7.2.80.0070.04820.73
7.2.70.0100.03620.87
7.2.60.0100.03820.88
7.2.50.0080.04120.81
7.2.40.0030.04420.90
7.2.30.0080.04020.93
7.2.20.0050.04620.77
7.2.10.0050.04420.99
7.2.00.0050.03820.72
7.1.330.0030.07819.84
7.1.320.0070.06619.67
7.1.310.0030.05919.71
7.1.300.0030.05619.73
7.1.290.0000.06419.74
7.1.280.0070.05219.87
7.1.270.0070.05319.71
7.1.260.0030.06119.75
7.1.250.0030.05219.64
7.1.240.0070.05919.69
7.1.230.0070.05319.49
7.1.220.0000.05819.85
7.1.210.0000.05719.87
7.1.200.0000.07519.74
7.1.190.0000.05819.95
7.1.180.0100.05619.58
7.1.170.0070.06619.84
7.1.160.0030.06219.66
7.1.150.0070.04919.95
7.1.140.0070.05319.72
7.1.130.0030.05519.83
7.1.120.0070.05219.80
7.1.110.0070.05919.77
7.1.100.0070.07619.60
7.1.90.0030.05419.50
7.1.80.0130.05319.70
7.1.70.0050.04420.43
7.1.60.0070.05620.64
7.1.50.0020.05620.37
7.1.40.0130.06819.91
7.1.30.0030.05719.83
7.1.20.0070.05019.77
7.1.10.0100.06419.80
7.1.00.0070.09023.13
7.0.330.0000.07119.48
7.0.320.0030.06119.27
7.0.310.0200.04919.67
7.0.300.0000.06519.46
7.0.290.0030.05719.18
7.0.280.0070.05519.38
7.0.270.0000.05919.43
7.0.260.0060.05219.42
7.0.250.0000.05219.29
7.0.240.0070.05719.48
7.0.230.0030.06419.42
7.0.220.0100.05119.51
7.0.210.0030.05419.63
7.0.200.0130.04020.00
7.0.190.0000.05519.28
7.0.180.0100.07119.45
7.0.170.0070.05119.53
7.0.160.0000.06119.49
7.0.150.0030.05319.52
7.0.140.0050.08722.82
7.0.130.0030.06919.61
7.0.120.0030.05619.41
7.0.110.0030.05519.63
7.0.100.0030.06019.49
7.0.90.0020.08921.59
7.0.80.0080.07821.83
7.0.70.0070.07021.68
7.0.60.0050.06921.75
7.0.50.0130.07621.82
7.0.40.0080.05616.76
7.0.30.0100.08616.79
7.0.20.0080.08816.68
7.0.10.0050.08316.61
7.0.00.0130.08916.80
5.6.400.0100.09619.14
5.6.390.0100.09819.41
5.6.380.0030.10819.05
5.6.370.0070.09819.49
5.6.360.0030.10519.16
5.6.350.0100.10019.46
5.6.340.0070.11619.47
5.6.330.0030.10419.52
5.6.320.0200.12619.16
5.6.310.0130.09019.07
5.6.300.0130.10719.18
5.6.290.0030.12519.11
5.6.280.0050.14322.43
5.6.270.0030.10119.03
5.6.260.0030.10319.67
5.6.250.0100.09619.67
5.6.240.0130.12122.47
5.6.230.0130.13922.46
5.6.220.0080.11422.50
5.6.210.0080.10722.44
5.6.200.0100.11022.65
5.6.190.0080.15422.81
5.6.180.0120.13522.79
5.6.170.0120.13722.69
5.6.160.0070.12922.49
5.6.150.0080.10322.80
5.6.140.0120.12122.68
5.6.130.0070.10622.72
5.6.120.0070.11122.67
5.6.110.0030.12022.63
5.6.100.0030.12122.56
5.6.90.0070.09922.55
5.6.80.0100.10322.19
5.6.70.0080.12122.16
5.6.60.0100.10222.28
5.6.50.0070.11622.28
5.6.40.0080.09322.23
5.6.30.0070.11322.28
5.6.20.0100.10222.39
5.6.10.0080.08922.17
5.6.00.0070.10122.28
5.5.380.0070.11522.38
5.5.370.0070.13122.26
5.5.360.0070.12022.42
5.5.350.0070.10522.36
5.5.340.0100.14922.44
5.5.330.0150.13722.62
5.5.320.0130.12522.44
5.5.310.0100.12422.58
5.5.300.0100.12722.33
5.5.290.0070.13822.53
5.5.280.0120.09822.53
5.5.270.0100.10422.51
5.5.260.0050.10122.60
5.5.250.0020.10322.47
5.5.240.0050.12322.13
5.5.230.0050.09622.13
5.5.220.0070.11522.11
5.5.210.0050.10622.26
5.5.200.0100.10122.15
5.5.190.0070.10722.19
5.5.180.0080.10522.21
5.5.170.0030.11819.13
5.5.160.0080.09022.20
5.5.150.0080.10321.97
5.5.140.0030.11222.21
5.5.130.0150.09422.26
5.5.120.0120.12522.21
5.5.110.0120.11822.21
5.5.100.0120.10422.17
5.5.90.0080.10321.97
5.5.80.0100.09922.13
5.5.70.0100.10822.05
5.5.60.0050.12522.16
5.5.50.0170.12422.13
5.5.40.0120.12422.25
5.5.30.0120.10422.25
5.5.20.0070.12222.13
5.5.10.0070.13122.00
5.5.00.0020.12022.08
5.4.450.0030.10620.12
5.4.440.0020.11220.15
5.4.430.0080.11820.20
5.4.420.0050.11320.24
5.4.410.0050.11220.05
5.4.400.0050.10319.76
5.4.390.0070.12319.78
5.4.380.0050.10419.80
5.4.370.0070.10319.81
5.4.360.0100.13019.95
5.4.350.0080.10419.82
5.4.340.0000.10819.89
5.4.330.0070.11015.93
5.4.320.0080.10520.01
5.4.310.0030.10319.91
5.4.300.0050.08820.01
5.4.290.0080.09719.97
5.4.280.0030.13819.66
5.4.270.0100.14119.98
5.4.260.0100.11619.99
5.4.250.0070.14119.98
5.4.240.0120.13720.04
5.4.230.0070.12919.99
5.4.220.0120.14219.89
5.4.210.0050.12219.94
5.4.200.0080.13020.06
5.4.190.0150.13419.84
5.4.180.0120.12819.88
5.4.170.0030.12619.92
5.4.160.0030.10519.84
5.4.150.0080.14119.97
5.4.140.0150.12618.79
5.4.130.0050.13918.63
5.4.120.0070.13418.73
5.4.110.0100.12718.52
5.4.100.0030.12918.51
5.4.90.0150.11518.68
5.4.80.0080.13418.69
5.4.70.0080.10318.52
5.4.60.0180.12118.69
5.4.50.0150.14618.54
5.4.40.0050.10118.59
5.4.30.0080.12118.68
5.4.20.0100.15718.62
5.4.10.0150.14818.60
5.4.00.0080.14218.37
5.3.290.0000.10319.44
5.3.280.0170.15719.26
5.3.270.0100.17019.30
5.3.260.0100.15019.43
5.3.250.0070.16719.45
5.3.240.0100.18319.41
5.3.230.0100.14719.46
5.3.220.0130.16319.44
5.3.210.0070.17719.26
5.3.200.0130.14019.33
5.3.190.0100.16019.30
5.3.180.0100.16319.27
5.3.170.0000.12719.27
5.3.160.0100.16019.36
5.3.150.0170.09719.32
5.3.140.0030.11019.23
5.3.130.0070.13019.31
5.3.120.0130.16019.42
5.3.110.0070.15719.30
5.3.100.0130.15318.88
5.3.90.0070.16318.86
5.3.80.0070.15318.84
5.3.70.0100.18018.75
5.3.60.0030.17718.62
5.3.50.0030.11718.61
5.3.40.0130.15018.64
5.3.30.0170.16718.71
5.3.20.0130.15018.49
5.3.10.0100.15018.53
5.3.00.0030.14718.46
5.2.170.0030.06711.16
5.2.160.0100.04711.23
5.2.150.0100.06011.02
5.2.140.0200.03711.05
5.2.130.0070.06011.11
5.2.120.0000.06711.11
5.2.110.0100.05711.01
5.2.100.0100.05311.13
5.2.90.0030.05311.21
5.2.80.0030.06310.98
5.2.70.0030.04011.22
5.2.60.0070.05710.98
5.2.50.0000.06310.88
5.2.40.0000.06311.02
5.2.30.0070.02710.88
5.2.20.0000.03010.89
5.2.10.0030.03310.95
5.2.00.0030.06010.82
5.1.60.0030.04710.38
5.1.50.0030.04310.38
5.1.40.0070.05310.38
5.1.30.0100.04710.38
5.1.20.0100.05710.38
5.1.10.0100.05010.38
5.1.00.0030.05310.38
5.0.50.0070.04010.38
5.0.40.0070.04010.38
5.0.30.0070.06310.38
5.0.20.0130.04310.38
5.0.10.0030.04310.38
5.0.00.0030.03710.38
4.4.90.0030.02310.38
4.4.80.0000.02710.38
4.4.70.0030.03710.38
4.4.60.0000.03310.38
4.4.50.0000.01710.38
4.4.40.0000.05710.38
4.4.30.0070.03010.38
4.4.20.0000.04010.38
4.4.10.0100.02310.38
4.4.00.0000.05010.38
4.3.110.0030.03710.38
4.3.100.0100.02310.38
4.3.90.0070.03010.38
4.3.80.0070.05010.38
4.3.70.0030.03310.38
4.3.60.0030.02710.38
4.3.50.0030.03710.38
4.3.40.0030.05310.38
4.3.30.0000.03710.38
4.3.20.0000.03010.38
4.3.10.0030.03010.38
4.3.00.0030.03310.38

preferences:
36.87 ms | 400 KiB | 5 Q