3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function uuid() { $x4 = function() { for ($n = ''; strlen($n) < 5; $n = $n.mt_rand()); return substr($n, -4); }; return sprintf( '%s-%04d-%04d-%04d-%04d%04d%04d', time(), $x4(), $x4(), $x4(), $x4(), $x4(), $x4(), $x4() ); } echo uuid();
based on RQf8o
Output for 7.1.0
1410543101-2847-8253-9291-628903675398
Output for 7.0.14
1410543101-3443-6992-2273-043105014575
Output for 7.0.9
1410543101-3968-3724-7363-339636052170
Output for 7.0.8
1410543101-1116-8520-9179-450148651380
Output for 7.0.7
1410543101-8035-5748-2923-739427101836
Output for 7.0.6
1410543101-9126-9679-0307-404873298509
Output for 7.0.5
1410543101-9297-7211-8023-682565439801
Output for 7.0.4
1410543101-8580-9876-1047-552464979744
Output for 7.0.3
1410543101-4500-9860-1253-958679324461
Output for 7.0.2
1410543101-9398-0261-9250-803409115041
Output for 7.0.1
1410543101-5047-4654-2409-987746217526
Output for 7.0.0
1410543101-9534-9035-7549-044340598135
Output for hhvm-3.12.0
1410543101-3299-9964-5914-816631184868
Output for hhvm-3.10.0
1410543101-9408-5717-8104-321911557408
Output for 5.6.28
1410543101-0738-0521-5115-284221472397
Output for 5.6.24
1410543101-1914-3546-4758-371849492844
Output for 5.6.23
1410543101-7236-4210-7197-757569583938
Output for 5.6.22
1410543101-9653-3476-6847-825029085582
Output for 5.6.21
1410543101-4810-6992-7703-303550801473
Output for 5.6.20
1410543101-6034-6603-1473-319610199016
Output for 5.6.19
1410543101-4378-7733-4839-671358175197
Output for 5.6.18
1410543101-3647-4916-6693-386966184234
Output for 5.6.17
1410543101-7630-6324-9236-253927335279
Output for 5.6.16
1410543101-3435-8790-0703-377167976719
Output for 5.6.15
1410543101-5689-6069-6219-553381553493
Output for 5.6.14
1410543101-9796-1340-6141-468403539739
Output for 5.6.13
1410543101-8469-6977-2672-554081515030
Output for 5.6.12
1410543101-0626-5442-1186-008031024130
Output for 5.6.11
1410543101-5413-2620-7238-111619825283
Output for 5.6.10
1410543101-0206-8178-3330-910206050683
Output for 5.6.9
1410543101-4352-8213-3186-231637473704
Output for 5.6.8
1410543101-6934-8108-8848-801546710879
Output for 5.6.7
1410543101-0944-9778-3061-568062335481
Output for 5.6.6
1410543101-3504-7196-2767-080190114229
Output for 5.6.5
1410543101-3065-9776-4992-150986331912
Output for 5.6.4
1410543101-6301-3333-9276-524427703260
Output for 5.6.3
1410543101-2908-8221-0250-592873802345
Output for 5.6.2
1410543101-8205-1547-8412-069125446050
Output for 5.6.1
1410543101-0554-2762-8813-257690772511
Output for 5.6.0
1410543101-4431-3444-8587-498522684476
Output for 5.5.38
1410543101-4526-3680-5398-400943518691
Output for 5.5.37
1410543101-3020-4220-8091-740374490947
Output for 5.5.36
1410543101-3676-9556-4531-568670320897
Output for 5.5.35
1410543101-9570-2347-1861-317046219611
Output for 5.5.34
1410543101-9296-6607-2959-848023900852
Output for 5.5.33
1410543101-0105-2026-2481-787031966177
Output for 5.5.32
1410543101-1399-7143-0137-299378339443
Output for 5.5.31
1410543101-3363-6920-8107-475127386722
Output for 5.5.30
1410543101-7110-5454-2155-989051897664
Output for 5.5.29
1410543101-0036-1668-5356-065926789638
Output for 5.5.28
1410543101-2048-6896-3499-491497601681
Output for 5.5.27
1410543101-1915-1881-0046-886423494256
Output for 5.5.26
1410543101-8082-9008-6483-709517898668
Output for 5.5.25
1410543101-2368-6451-1980-168471737172
Output for 5.5.24
1410543101-6865-9413-6062-526208946053
Output for 5.5.23
1410543101-5944-8111-1301-900481100825
Output for 5.5.22
1410543101-2270-8739-3838-383291595526
Output for 5.5.21
1410543101-4683-3353-6880-968175364151
Output for 5.5.20
1410543101-9857-0502-6868-736391032411
Output for 5.5.19
1410543101-1817-5080-5633-445293133442
Output for 5.5.18
1410543101-1349-5530-2674-436897672491
Output for 5.5.16
1410543101-9199-1369-7852-132203735632
Output for 5.5.15
1410543101-6596-1775-6760-687120648961
Output for 5.5.14
1410543101-7415-8789-8542-911128451245
Output for 5.5.13
1410543101-0455-0740-5685-934243719840
Output for 5.5.12
1410543101-4335-3860-4141-320820521896
Output for 5.5.11
1410543101-5107-7910-1713-270122260104
Output for 5.5.10
1410543101-3008-6958-1005-787470857373
Output for 5.5.9
1410543101-8081-2115-5461-253506983562
Output for 5.5.8
1410543101-1246-9508-1062-605464893762
Output for 5.5.7
1410543101-0440-5873-0020-359570742755
Output for 5.5.6
1410543101-5785-7854-6965-778111317495
Output for 5.5.5
1410543101-5326-2467-1101-378886908092
Output for 5.5.4
1410543101-8916-9081-1772-805261745690
Output for 5.5.3
1410543101-0796-6315-2847-242788051218
Output for 5.5.2
1410543101-0014-0556-7103-491365593194
Output for 5.5.1
1410543101-8568-2510-0912-533261322843
Output for 5.5.0
1410543101-9940-6679-8408-046016892204
Output for 5.4.45
1410543101-6889-4783-1024-652396452596
Output for 5.4.44
1410543101-2759-1775-3452-173881506607
Output for 5.4.43
1410543101-6619-1847-5788-045340986737
Output for 5.4.42
1410543101-2233-9863-0288-333737916443
Output for 5.4.41
1410543101-7087-9001-7182-951652405781
Output for 5.4.40
1410543101-0759-4687-5557-111474951700
Output for 5.4.39
1410543101-0159-1936-0337-909006229406
Output for 5.4.38
1410543101-6060-3676-1168-165757019306
Output for 5.4.37
1410543101-4805-4500-6995-265881538188
Output for 5.4.36
1410543101-5958-5309-4744-673503287556
Output for 5.4.35
1410543101-0599-7995-3101-729478439127
Output for 5.4.34
1410543101-5448-6110-6362-113381694176
Output for 5.4.32
1410543101-2194-8780-0749-298504506129
Output for 5.4.31
1410543101-6487-6129-1760-077407692473
Output for 5.4.30
1410543101-1264-2441-8896-605337388961
Output for 5.4.29
1410543101-7501-0476-6329-207400363182
Output for 5.4.28
1410543101-2961-5343-8057-665494541241
Output for 5.4.27
1410543101-8032-0788-7990-996993350056
Output for 5.4.26
1410543101-2713-5799-0756-076338121621
Output for 5.4.25
1410543101-7892-9759-9662-289096788635
Output for 5.4.24
1410543101-6085-6565-7642-719610256138
Output for 5.4.23
1410543101-1011-5997-8396-454168954581
Output for 5.4.22
1410543101-0473-1389-5622-240343898493
Output for 5.4.21
1410543101-8717-8854-9540-007513085571
Output for 5.4.20
1410543101-5366-9392-1069-024654142082
Output for 5.4.19
1410543101-4427-6958-2962-327469197694
Output for 5.4.18
1410543101-2841-0107-7554-812765603095
Output for 5.4.17
1410543101-1429-3711-3397-175273989315
Output for 5.4.16
1410543101-0463-7999-2470-705392272478
Output for 5.4.15
1410543101-8106-3385-9720-566721513167
Output for 5.4.14
1410543101-3296-0889-4411-645591618114
Output for 5.4.13
1410543101-4581-3993-3097-697514785146
Output for 5.4.12
1410543101-5196-0959-1444-425765430216
Output for 5.4.11
1410543101-8410-2551-7630-772833871488
Output for 5.4.10
1410543101-7088-0202-2491-423912763180
Output for 5.4.9
1410543101-8020-9916-7475-774688228172
Output for 5.4.8
1410543101-5978-7340-2182-612991024230
Output for 5.4.7
1410543101-8454-5538-1334-187390334979
Output for 5.4.6
1410543101-3427-5531-0084-373525325762
Output for 5.4.5
1410543101-2708-3418-4748-569748587734
Output for 5.4.4
1410543101-6391-6214-7935-209480299107
Output for 5.4.3
1410543101-5667-4612-2134-871958590483
Output for 5.4.2
1410543101-4505-8811-9880-669208556906
Output for 5.4.1
1410543101-3756-1563-9474-689587452060
Output for 5.4.0
1410543101-7284-3442-1517-091401662008
Output for 5.3.29
1410543101-5630-8320-4088-106226842749
Output for 5.3.28
1410543101-9642-1891-3568-799396956606
Output for 5.3.27
1410543101-8441-8479-6704-638231367516
Output for 5.3.26
1410543101-4345-8150-9908-753025223115
Output for 5.3.25
1410543101-0307-7329-3798-907599487709
Output for 5.3.24
1410543101-7632-2420-8622-125426938593
Output for 5.3.23
1410543101-7251-5425-6467-322755356189
Output for 5.3.22
1410543101-3353-2804-0611-422706925494
Output for 5.3.21
1410543101-2231-8917-3849-522714922651
Output for 5.3.20
1410543101-8015-0854-5356-785811530748
Output for 5.3.19
1410543101-0807-3031-0309-232776526775
Output for 5.3.18
1410543101-7319-4850-9104-437304951327
Output for 5.3.17
1410543101-7745-1788-9731-924798693477
Output for 5.3.16
1410543101-4035-4651-6302-879474601293
Output for 5.3.15
1410543101-0637-6576-4510-054109705748
Output for 5.3.14
1410543101-1479-2316-0996-503533557784
Output for 5.3.13
1410543101-2635-3935-0122-102566478804
Output for 5.3.12
1410543101-1843-7523-8595-754172663645
Output for 5.3.11
1410543101-9217-9937-6470-453083473876
Output for 5.3.10
1410543101-4445-3301-2066-777078060428
Output for 5.3.9
1410543101-6681-1441-9556-365251778090
Output for 5.3.8
1410543101-3121-8222-9479-180984129730
Output for 5.3.7
1410543101-6282-0321-5827-672658176454
Output for 5.3.6
1410543101-1627-2560-9338-350041588983
Output for 5.3.5
1410543101-6785-1448-0898-769768219180
Output for 5.3.4
1410543101-3742-4260-8530-558603492132
Output for 5.3.3
1410543101-0942-4543-9271-270361632033
Output for 5.3.2
1410543101-6760-2512-1235-574716841242
Output for 5.3.1
1410543101-1642-0267-4574-683097975469
Output for 5.3.0
1410543101-9671-8800-7486-334181508582
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/AZiWo on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/AZiWo on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/AZiWo on line 4
Process exited with code 255.