3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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();
based on oS3eQ
Output for 7.1.0
{51399DFD-9F00-A5EE-3014-B99FB7E5BF09}
Output for 7.0.14
{7A954B4D-1D3C-E971-D686-C68650D26F54}
Output for 7.0.6
{108DAE50-F0FD-9EF8-57A3-783A7D551765}
Output for 7.0.5
{6E324D6F-50EB-E0EF-AD1F-75CD87E1BD52}
Output for 7.0.4
{15F4B08A-FF22-15A9-EF6F-210B699AEF88}
Output for 7.0.3
{7B928916-ADB3-95A2-610E-75F094A3A252}
Output for 7.0.2
{45160672-741C-1D4C-E0CB-6694EC4EDBCF}
Output for 7.0.1
{9BE0B333-3470-99C3-0C40-B67A82BBF510}
Output for 7.0.0
{CAC9E0CF-8A8F-29FA-C216-53FA0157F32B}
Output for 5.6.28
{A6B4D9E3-723D-C276-3AF1-4C2F8D6FBFA2}
Output for 5.6.21
{0AB9B8F1-ACEB-DC5C-DCAC-293C27181806}
Output for 5.6.20
{B29FDE5D-65B1-E7F7-8FB0-741C53892B85}
Output for 5.6.19
{7DE4AC45-9ADF-DE9A-ED34-1918D0787ABC}
Output for 5.6.18
{51F9FD7E-FFD7-5630-C3B9-F7E3AC747926}
Output for 5.6.17
{F5EBCA29-8EE5-04AF-4636-13E233CC1C8D}
Output for 5.6.16
{40932A02-AB66-F6A1-2D64-F75BA95CFDA3}
Output for 5.6.15
{C9C5DC62-9A10-6008-C97F-6ACBD35B2D70}
Output for 5.6.14
{69C20556-C8C9-5ADE-19A2-7F4CB3570C20}
Output for 5.6.13
{748F2BB6-CC19-B2AF-1DC9-7E9A9937F245}
Output for 5.6.12
{803B233D-C907-EF08-BEDF-A3E379DD29DE}
Output for 5.6.11
{403ACCB1-0EB7-6637-F3E0-E8A7DDF3E238}
Output for 5.6.10
{041BE8E7-8873-FDB0-1F55-78223A61DC1F}
Output for 5.6.9
{4FCD761B-6B91-F503-8F46-DBCE03967AA8}
Output for 5.6.8
{FA3D64E0-EDA9-41DB-FB73-49EBD17915B0}
Output for 5.5.35
{F2FB8554-BB19-7E1E-3804-E2A0010C8239}
Output for 5.5.34
{6CC4EA56-BD3F-7491-A0DB-55B7BD76B270}
Output for 5.5.33
{A8BF4DD1-6D5F-27BA-9539-588BBCEED130}
Output for 5.5.32
{69E596E7-2C8C-FF71-DA3D-35898D540CDE}
Output for 5.5.31
{F4427D2D-A64A-C3EB-69D7-356F74567805}
Output for 5.5.30
{53594ECC-2095-6320-26C0-AAFC0A0B5D01}
Output for 5.5.29
{B2C56592-1AB2-C3F7-AEC7-715D2DDD182C}
Output for 5.5.28
{E2EEB2AC-D288-6473-1C2E-06C2948A342F}
Output for 5.5.27
{DAD805B4-802B-2387-634F-D4487ACF28C9}
Output for 5.5.26
{6C0E56B2-8C54-378E-5CCD-9AF6E58025F9}
Output for 5.5.25
{E38016C8-4BBB-2BA8-6094-E1CE28F8A699}
Output for 5.5.24
{23225E0C-AC4B-DCC7-277F-47670FE90A93}
Output for 5.4.45
{406CF2B7-46D5-0695-482D-83DC1B6380BB}
Output for 5.4.44
{C82705EB-C8C9-63B4-B84B-798BF35AB441}
Output for 5.4.43
{48CDB2E3-43FE-C4F7-BBF3-8FDD0E6C2716}
Output for 5.4.42
{87A33A5C-75BE-2BD4-D504-C56097E63E49}
Output for 5.4.41
{8BB6065F-D79B-9F83-254C-33ECF8279B81}
Output for 5.4.40
{296CEFD8-4B3A-0625-BB54-4539810D8170}
Output for 5.4.39
{0BA3404C-10E7-39BB-EBAA-703B45BBF42E}
Output for 5.4.38
{352821E1-55A8-36C8-4ED8-DC05AFE97194}
Output for 5.4.37
{50BF40C2-C36E-31F8-DBBE-71C3CA4F87BC}
Output for 5.4.36
{D04A4891-4DA5-5756-B34D-1877282CF91C}
Output for 5.4.35
{AD75EF4F-13BD-7D1D-C030-2C64A6557215}
Output for 5.4.34
{FCC90F45-21C7-21E3-83A1-D985DA4A58DF}
Output for 5.4.32
{DACD1807-0ED7-7720-6C34-95204EBDF348}
Output for 5.4.31
{B06D5973-F9C5-B608-FAB4-B12990152824}
Output for 5.4.30
{19E8A4B2-34ED-EAA9-B8C5-5E9972B6E77C}
Output for 5.4.29
{92DCF453-B168-FE36-5CE2-0C5075C83F71}
Output for 5.4.28
{07F9EA62-38EE-5663-3BF1-871FCEF50384}
Output for 5.4.27
{65AABF4E-519D-CF2F-24DF-4FA38A63F9B0}
Output for 5.4.26
{29F5ABFB-0B23-863B-4ABE-17AC3989BAC1}
Output for 5.4.25
{D77C8A8D-9EE5-0FC1-B0D5-84E973B256CB}
Output for 5.4.24
{0AA93195-B1BC-50BB-2204-461FD1D9764C}
Output for 5.4.23
{E93DCB4A-EBA5-D9DC-E4B9-44D3F585F078}
Output for 5.4.22
{0EEE24DF-A703-D6A0-54D0-0F8DBF177844}
Output for 5.4.21
{514E9CF4-8011-4880-8DF8-5A3E7D10DFAE}
Output for 5.4.20
{D13EADB3-D387-56B1-9D7E-1AD64BAD3F99}
Output for 5.4.19
{86AE414D-0F36-2231-0CFC-76D949F6C8CA}
Output for 5.4.18
{746E9155-6081-2AD4-4870-8C2F00077D9C}
Output for 5.4.17
{B2BA64E8-B599-770A-70E8-29D5145006D1}
Output for 5.4.16
{C7F92C3F-F8F8-253C-EDF3-6EA2D72F9A74}
Output for 5.4.15
{81BC2583-6540-3CEB-5C96-7C11E18B4006}
Output for 5.4.14
{D0A86B81-6A0E-33BD-F295-04F74E30251E}
Output for 5.4.13
{7A9079C4-E144-553E-2D5C-4FAC401A2524}
Output for 5.4.12
{2DEDA22F-8283-03F2-A37A-31F3A0DD38D9}
Output for 5.4.11
{B0FC8616-BDD4-1AC3-0713-0DC48BAD6F16}
Output for 5.4.10
{72A78D89-A6E5-1B7F-0FBB-999427AE23C1}
Output for 5.4.9
{C2952E27-B4C5-DFEA-F860-2A11A2DDDFCB}
Output for 5.4.8
{2DBDDCA3-4345-F5B0-1DA6-B47DECC49A9B}
Output for 5.4.7
{B71E18AC-A41A-8D82-05DA-32FB37E082DC}
Output for 5.4.6
{9471BE94-8393-DA94-B53E-C9003BB8E773}
Output for 5.4.5
{A568FCCE-D97D-B137-88BB-FAA608FE3F40}
Output for 5.4.4
{E74502B7-F7A8-A166-D9FB-CEB189470974}
Output for 5.4.3
{F3243746-5A86-287A-33E8-C3F617909097}
Output for 5.4.2
{E49833A9-0280-DE12-0E36-E0487F68FDBE}
Output for 5.4.1
{6763D4D1-4F68-FC45-90E8-C99191522ADC}
Output for 5.4.0
{00D72B5A-55A3-4ACB-7460-914D5F4397FF}
Output for 5.3.29
{1085D846-2438-002C-42A6-DD9253B359DE}
Output for 5.3.28
{B5370F69-C5BC-49BA-2506-65487D1C4046}
Output for 5.3.27
{058FEBC0-F0E6-E9A1-D48E-860591A17FA6}
Output for 5.3.26
{B8F15BA5-5699-EA25-44D1-A1DD3D84FE55}
Output for 5.3.25
{CB40A2D3-B97F-3F41-A682-A60850C4119F}
Output for 5.3.24
{441DA5B9-08A9-2188-0FBD-8046F52C9243}
Output for 5.3.23
{FEF32EAE-CDFA-3DA7-BA65-7A9F1FA73B08}
Output for 5.3.22
{140B65DA-C565-66B1-9EA7-DC5951AFDF08}
Output for 5.3.21
{5483EC36-DB0E-2B3E-9855-10CF1957C863}
Output for 5.3.20
{9F1BC8DC-03BF-D526-A36F-7A58653ABDA4}
Output for 5.3.19
{2102A5F4-6648-1181-D988-39D18B8C8F54}
Output for 5.3.18
{554398F5-1E44-B641-A132-04C8E65FDCCD}
Output for 5.3.17
{B84D90FE-8D69-6B42-2DC5-973F13676C9D}
Output for 5.3.16
{CB0C79D2-27C8-5884-2669-CA8D9C74428A}
Output for 5.3.15
{C535BE82-CDDA-7B69-08C9-6F1463C66ED5}
Output for 5.3.14
{EDA04570-6DF1-8ACB-D156-A92CD3FBA199}
Output for 5.3.13
{B07E3406-F953-107E-98ED-00145A34F816}
Output for 5.3.12
{D78CF0DE-3E08-AEA2-CE14-AB6C2812274E}
Output for 5.3.11
{C4DD3992-1B01-C6B0-F9C3-153B2C59DB8F}
Output for 5.3.10
{2EF26F84-4625-CC5C-9D9B-F5AFD0A86CBA}
Output for 5.3.9
{DF292E5F-3CC9-39D1-00EA-A5DB87DF9934}
Output for 5.3.8
{ED84D9BC-23D3-097F-7A33-28E261A8A342}
Output for 5.3.7
{CBCCA090-9732-956F-0D2C-C7D7D48D1864}
Output for 5.3.6
{97EBD45F-DF93-32D2-6C38-C983BB42EBCF}
Output for 5.3.5
{370A73ED-AA77-E74F-857E-5E584B1E5F97}
Output for 5.3.4
{CDA05AC7-A00F-A76D-780C-B177CBD804FF}
Output for 5.3.3
{91D339FC-504E-C9C7-D4E1-23084DDBFBCB}
Output for 5.3.2
{9C0AEDF1-D3B3-DE92-A068-A43CCE5B3600}
Output for 5.3.1
{9B505EDF-F8D7-0068-F1F1-F91D059E4079}
Output for 5.3.0
{A1700671-3F2A-C2A1-79AE-459B5EF664A8}
Output for 5.2.17
{22D029C1-DE23-3D82-B18F-987F0AE72F4A}
Output for 5.2.16
{BA665435-AB22-29EF-BB9B-0E28ED388000}
Output for 5.2.15
{3605E1F0-33A0-9816-30F7-E7B5D950E6B1}
Output for 5.2.14
{33B0155B-F4F0-4AA6-DABE-FA1E3E465B9E}
Output for 5.2.13
{B0B2B59C-623B-98BF-A19F-F230B36FFF5C}
Output for 5.2.12
{0CC28516-B142-93FA-CBD0-17689EDB8CCA}
Output for 5.2.11
{84FF5000-A885-1E45-83DC-310F51480E03}
Output for 5.2.10
{2787CD8C-B608-200D-EF1F-344682FE353C}
Output for 5.2.9
{7D9B2858-5F74-559C-27E8-690CF8A6CC6D}
Output for 5.2.8
{9AD25FB3-FC32-A0E1-45C3-BC41F543BA8D}
Output for 5.2.7
{2784817E-6730-56DE-EE81-F91C85F2C7D5}
Output for 5.2.6
{6EF8EA7F-5B8E-A245-CC96-56344D722740}
Output for 5.2.5
{2AB59868-E8C7-FA57-6FD5-5419E8B28A75}
Output for 5.2.4
{DA7C2D84-01A3-AD41-A893-E055E6802EAB}
Output for 5.2.3
{8C5C21E7-0C72-0E55-A020-B56045595AA4}
Output for 5.2.2
{D0F4DEBE-51A4-25C6-BC25-E3176BE02596}
Output for 5.2.1
{EDE0B44A-0348-2867-E4E3-8D7FEFEF871F}
Output for 5.2.0
{40FE43D9-43C6-DD5A-A508-B35007D8502C}
Output for 5.1.6
{FC1BC7BE-8428-AE4A-77AD-DCD62427E34A}
Output for 5.1.5
{36F4D0CB-6E88-97D5-1EAE-89D11131D45A}
Output for 5.1.4
{17EFDE7B-6A44-C83E-5FA6-12D10269FEDE}
Output for 5.1.3
{4F36AFCF-5F13-9B7A-1AAD-772F1376A808}
Output for 5.1.2
{77E35FF1-A8AB-222A-1684-A1E4FA53CDF2}
Output for 5.1.1
{9B4ADD29-A811-B0B6-A584-A0EE530FE657}
Output for 5.1.0
{140DB103-4E59-DF54-8412-17ED1EF32A53}
Output for 5.0.5
{17E044CD-6D23-3B02-503A-1B38C714F7AF}
Output for 5.0.4
{65016D95-DDDA-60B6-4610-5E0E464B0329}
Output for 5.0.3
{A5149908-46CF-1C4A-7E18-C4F9098F15C5}
Output for 5.0.2
{238C5F0D-36D7-176E-F0E5-983B2C4AB731}
Output for 5.0.1
{705C3A31-F637-63B9-3D02-5D8D2C4D1145}
Output for 5.0.0
{F4AD99A8-9B5A-6739-D1F1-5A9AEF8AF59E}
Output for 4.4.9
{D4AA10FC-236C-FE86-7AA4-00C5205F69B1}
Output for 4.4.8
{7502ABDD-F1D0-D66F-1252-A93BB65E09C4}
Output for 4.4.7
{4F2FB098-731D-50A9-9F38-2AF8101885DE}
Output for 4.4.6
{A375D6DF-BFD6-C3F0-6584-41A6126ED522}
Output for 4.4.5
{D9CD3213-95C2-341B-B5BF-87CCC450118F}
Output for 4.4.4
{9588D0EE-BC20-F70F-3D95-F468307E7541}
Output for 4.4.3
{D357A841-C9A7-2B25-8C2C-10AE2D7E2BAF}
Output for 4.4.2
{4AE7EF53-515F-4FEF-0838-B65BFA816A86}
Output for 4.4.1
{E2D17480-B537-D630-34CC-E39CE2828E1B}
Output for 4.4.0
{7565232A-7AE9-7659-F7DD-AA32EDFB87F9}
Output for 4.3.11
{1F80FB03-879B-8DCB-7352-FBC69DED83AE}
Output for 4.3.10
{B9FF86D3-668B-205A-5B27-C8A307A7AC91}
Output for 4.3.9
{FBCC629E-5C08-E7C6-7EBF-BF7753A2B8D8}
Output for 4.3.8
{EFC095BD-80B2-982D-1A5E-69B45F854D55}
Output for 4.3.7
{56CA512E-2722-2972-C82E-9CD32B58ECD7}
Output for 4.3.6
{78516726-2E75-2370-D6C8-689F4E9AE26D}
Output for 4.3.5
{F08301E9-3B35-B806-041D-F573BC5FBE34}
Output for 4.3.4
{5ECEF3CE-B40A-08E0-0568-40BFFA536BB1}
Output for 4.3.3
{A9DA39D4-6AA3-FC5C-C2B7-C645C48AD4CC}
Output for 4.3.2
{E1214467-B733-B2FD-960A-76E4C7EBEFB8}
Output for 4.3.1
{91EFCBE3-5650-58B9-7627-92499892B42A}
Output for 4.3.0
{77154C45-60E0-4F2D-57A6-D2B1EEEFDAC9}