3v4l.org

run code in 300+ PHP versions simultaneously
<?php function guid(){ if (function_exists('com_create_guid')){ return com_create_guid(); }else{ mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up. $charid = strtoupper(md5(uniqid(rand(), true))); $hyphen = chr(45);// "-" $uuid = chr(123)// "{" .substr($charid, 0, 8).$hyphen .substr($charid, 8, 4).$hyphen .substr($charid,12, 4).$hyphen .substr($charid,16, 4).$hyphen .substr($charid,20,12) .chr(125);// "}" return $uuid; } } echo guid();

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.1.70.0020.00517.01
7.1.60.0060.01919.61
7.1.50.0060.01116.79
7.1.00.0070.07322.28
7.0.200.0050.00316.78
7.0.140.0130.06021.95
7.0.60.0070.08319.94
7.0.50.0100.07717.97
7.0.40.0130.03720.02
7.0.30.0370.04020.25
7.0.20.0430.07320.18
7.0.10.0070.07720.30
7.0.00.0030.04020.22
5.6.280.0030.07321.07
5.6.210.0100.07720.55
5.6.200.0100.07018.16
5.6.190.0170.07720.77
5.6.180.0370.07320.77
5.6.170.0270.07320.46
5.6.160.0070.05020.39
5.6.150.0070.07318.25
5.6.140.0130.07018.14
5.6.130.0000.05718.18
5.6.120.0030.04720.81
5.6.110.0100.06320.99
5.6.100.0100.08020.89
5.6.90.0000.04721.11
5.6.80.0070.03720.36
5.5.350.0170.08020.53
5.5.340.0070.07317.99
5.5.330.0100.08020.42
5.5.320.0330.07320.41
5.5.310.0230.06720.24
5.5.300.0100.05718.01
5.5.290.0030.08318.02
5.5.280.0170.07720.69
5.5.270.0130.08020.85
5.5.260.0130.03720.84
5.5.250.0100.06320.69
5.5.240.0130.08320.27
5.4.450.0100.05319.64
5.4.440.0230.05319.38
5.4.430.0470.06719.19
5.4.420.0130.04719.55
5.4.410.0270.04019.07
5.4.400.0100.04319.09
5.4.390.0130.04719.20
5.4.380.0430.05318.80
5.4.370.0300.06018.56
5.4.360.0300.05718.80
5.4.350.0400.04718.78
5.4.340.0270.05318.78
5.4.320.0060.03812.50
5.4.310.0050.04112.50
5.4.300.0070.04012.51
5.4.290.0100.03712.51
5.4.280.0080.04112.40
5.4.270.0090.03412.40
5.4.260.0110.03312.41
5.4.250.0050.03812.40
5.4.240.0100.03312.41
5.4.230.0050.03812.39
5.4.220.0090.03612.39
5.4.210.0090.03312.39
5.4.200.0060.04512.40
5.4.190.0040.03812.39
5.4.180.0050.03912.39
5.4.170.0060.03712.40
5.4.160.0070.03712.39
5.4.150.0090.03412.39
5.4.140.0120.03312.07
5.4.130.0100.03312.07
5.4.120.0090.04012.02
5.4.110.0080.03412.02
5.4.100.0040.03812.02
5.4.90.0050.03712.02
5.4.80.0070.03812.02
5.4.70.0030.04012.01
5.4.60.0050.03512.01
5.4.50.0090.03112.01
5.4.40.0050.03812.00
5.4.30.0070.03612.00
5.4.20.0030.03812.00
5.4.10.0040.03712.00
5.4.00.0040.03711.49
5.3.290.0050.04712.80
5.3.280.0090.03412.71
5.3.270.0080.03712.73
5.3.260.0060.04112.72
5.3.250.0060.03712.71
5.3.240.0040.03812.72
5.3.230.0040.04012.71
5.3.220.0100.03612.68
5.3.210.0080.03612.68
5.3.200.0060.03612.68
5.3.190.0070.03912.68
5.3.180.0080.03512.68
5.3.170.0100.03412.67
5.3.160.0070.03612.67
5.3.150.0060.03712.67
5.3.140.0090.03312.66
5.3.130.0060.04012.66
5.3.120.0070.03712.66
5.3.110.0050.04012.65
5.3.100.0160.03712.12
5.3.90.0050.03712.11
5.3.80.0080.03412.10
5.3.70.0020.04012.10
5.3.60.0080.03812.08
5.3.50.0070.03512.02
5.3.40.0060.04212.02
5.3.30.0060.04611.98
5.3.20.0080.03411.77
5.3.10.0070.03611.74
5.3.00.0050.04611.72
5.2.170.0050.0319.21
5.2.160.0030.0319.22
5.2.150.0040.0389.22
5.2.140.0060.0359.21
5.2.130.0040.0319.18
5.2.120.0090.0259.18
5.2.110.0070.0389.19
5.2.100.0060.0409.18
5.2.90.0060.0419.18
5.2.80.0050.0319.18
5.2.70.0060.0319.18
5.2.60.0040.0439.13
5.2.50.0070.0339.11
5.2.40.0030.0329.08
5.2.30.0060.0389.05
5.2.20.0060.0289.04
5.2.10.0070.0318.95
5.2.00.0060.0338.80
5.1.60.0060.0228.09
5.1.50.0050.0238.09
5.1.40.0070.0258.07
5.1.30.0070.0278.42
5.1.20.0050.0278.44
5.1.10.0060.0248.16
5.1.00.0070.0238.16
5.0.50.0030.0216.66
5.0.40.0060.0176.52
5.0.30.0070.0366.33
5.0.20.0090.0216.32
5.0.10.0010.0256.31
5.0.00.0040.0306.30
4.4.90.0030.0164.78
4.4.80.0030.0154.75
4.4.70.0010.0184.76
4.4.60.0020.0164.75
4.4.50.0050.0144.77
4.4.40.0010.0274.71
4.4.30.0030.0154.76
4.4.20.0010.0174.85
4.4.10.0030.0154.84
4.4.00.0030.0254.76
4.3.110.0020.0184.67
4.3.100.0010.0164.67
4.3.90.0010.0164.64
4.3.80.0020.0254.60
4.3.70.0040.0134.63
4.3.60.0070.0104.63
4.3.50.0040.0144.63
4.3.40.0030.0244.54
4.3.30.0020.0163.35
4.3.20.0040.0143.34
4.3.10.0030.0153.29
4.3.00.0000.01718.16

preferences:
31.25 ms | 401 KiB | 5 Q