3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function uuid() { $x4 = function() { $n = ''; while (strlen($n) < 4) { $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 kMcT5
Output for 7.1.0
1410542930-6133-5768-5536-441587051635
Output for 7.0.14
1410542930-2325-4733-9347-291286016459
Output for 7.0.9
1410542930-4884-0888-0699-190280436390
Output for 7.0.8
1410542930-6708-7391-9702-172332429359
Output for 7.0.7
1410542930-6205-0337-2785-732711868691
Output for 7.0.6
1410542930-1759-2189-0176-862110076550
Output for 7.0.5
1410542930-9242-3235-0438-663174638834
Output for 7.0.4
1410542930-5145-4218-4367-452032614062
Output for 7.0.3
1410542930-0804-3129-9676-598955628209
Output for 7.0.2
1410542930-2263-1702-5191-930730899576
Output for 7.0.1
1410542930-9028-4161-9060-759475156660
Output for 7.0.0
1410542930-6467-2935-1826-546925430610
Output for hhvm-3.12.0
1410542930-4798-7826-8384-636336082248
Output for hhvm-3.10.0
1410542930-2642-5048-8087-627870608162
Output for 5.6.28
1410542930-8026-8695-0739-637257255000
Output for 5.6.24
1410542930-5352-8712-4584-234211890876
Output for 5.6.23
1410542930-2341-2827-8467-323217922436
Output for 5.6.22
1410542930-3032-2609-8773-973928918866
Output for 5.6.21
1410542930-2471-5944-1839-252771071616
Output for 5.6.20
1410542930-1124-6015-9795-175544144514
Output for 5.6.19
1410542930-1415-0429-7085-737009765248
Output for 5.6.18
1410542930-2112-6803-2575-202020856715
Output for 5.6.17
1410542930-0833-9642-0656-051633186071
Output for 5.6.16
1410542930-3236-6587-9496-551602534589
Output for 5.6.15
1410542930-2896-6690-6979-861223590021
Output for 5.6.14
1410542930-7369-4344-9758-965167145296
Output for 5.6.13
1410542930-8581-4131-3936-593995285916
Output for 5.6.12
1410542930-8162-3443-5646-156147813003
Output for 5.6.11
1410542930-9551-8276-1083-531885246111
Output for 5.6.10
1410542930-4799-0629-6918-016290169764
Output for 5.6.9
1410542930-6390-5919-1542-967740904310
Output for 5.6.8
1410542930-5088-4513-7020-994173469902
Output for 5.6.7
1410542930-4590-0093-2625-215170415923
Output for 5.6.6
1410542930-2335-3954-8351-042755311526
Output for 5.6.5
1410542930-2403-4409-4682-968149216818
Output for 5.6.4
1410542930-4660-3346-6873-792671357208
Output for 5.6.3
1410542930-7349-5708-1227-637049492481
Output for 5.6.2
1410542930-9415-9671-8898-645827420607
Output for 5.6.1
1410542930-7652-8609-0972-374756266528
Output for 5.6.0
1410542930-7105-7357-6331-940828309677
Output for 5.5.38
1410542930-1292-1867-8022-955765003564
Output for 5.5.37
1410542930-2674-0867-0888-674671903563
Output for 5.5.36
1410542930-9622-7001-1475-842870576218
Output for 5.5.35
1410542930-7276-2055-9808-847052597440
Output for 5.5.34
1410542930-9431-3262-8413-613300582067
Output for 5.5.33
1410542930-5752-6486-3204-418317606261
Output for 5.5.32
1410542930-7096-1928-3016-138804518809
Output for 5.5.31
1410542930-9357-4969-6421-296286287269
Output for 5.5.30
1410542930-4134-8519-6985-341670122880
Output for 5.5.29
1410542930-5100-1844-7722-511981802655
Output for 5.5.28
1410542930-1264-6703-0265-285274710758
Output for 5.5.27
1410542930-1080-0615-1952-954521458212
Output for 5.5.26
1410542930-6486-4384-0342-858915052540
Output for 5.5.25
1410542930-4072-0820-3601-482087814400
Output for 5.5.24
1410542930-7557-5546-1678-506576671292
Output for 5.5.23
1410542930-9778-3349-8082-931597599908
Output for 5.5.22
1410542930-2027-5253-1162-667946902571
Output for 5.5.21
1410542930-5320-0068-5356-975305833899
Output for 5.5.20
1410542930-1104-5429-4797-176338095643
Output for 5.5.19
1410542930-1145-2078-4301-479020494703
Output for 5.5.18
1410542930-1384-1560-0309-584919309413
Output for 5.5.16
1410542930-4663-9201-0899-130820140298
Output for 5.5.15
1410542930-3751-9765-9229-942660641459
Output for 5.5.14
1410542930-0911-8389-5640-278917299419
Output for 5.5.13
1410542930-1639-5165-1140-640505213056
Output for 5.5.12
1410542930-4739-9782-6702-277785327953
Output for 5.5.11
1410542930-6164-1781-5860-618277473969
Output for 5.5.10
1410542930-7847-5949-0259-145501554666
Output for 5.5.9
1410542930-6668-2211-2190-739970371327
Output for 5.5.8
1410542930-4027-9181-5122-564597129999
Output for 5.5.7
1410542930-5584-8415-7150-728967517844
Output for 5.5.6
1410542930-2398-4671-6617-814342986297
Output for 5.5.5
1410542930-2909-9559-6439-250524312638
Output for 5.5.4
1410542930-1732-4603-3561-799346517746
Output for 5.5.3
1410542930-2008-2336-9412-557186282064
Output for 5.5.2
1410542930-0759-3066-5342-710416395565
Output for 5.5.1
1410542930-1287-2667-4605-553376320989
Output for 5.5.0
1410542930-6179-5535-4581-938091444197
Output for 5.4.45
1410542930-7000-8739-7482-846406861582
Output for 5.4.44
1410542930-2298-5148-8400-332208120063
Output for 5.4.43
1410542930-9730-7226-8991-653526644670
Output for 5.4.42
1410542930-2295-7941-0058-891922364809
Output for 5.4.41
1410542930-4251-3417-2725-745301040911
Output for 5.4.40
1410542930-6022-8174-7586-066467569062
Output for 5.4.39
1410542930-8076-0493-2356-355279286241
Output for 5.4.38
1410542930-6946-7955-4100-399867504664
Output for 5.4.37
1410542930-3213-7263-3004-749878627029
Output for 5.4.36
1410542930-5887-4435-5826-994897975700
Output for 5.4.35
1410542930-0017-8719-6255-022427857660
Output for 5.4.34
1410542930-4996-3960-1369-085252875439
Output for 5.4.32
1410542930-0074-8998-2860-538565991317
Output for 5.4.31
1410542930-3510-4401-4684-235870325693
Output for 5.4.30
1410542930-7159-2804-2281-961461651785
Output for 5.4.29
1410542930-0939-8290-2275-306284813351
Output for 5.4.28
1410542930-1644-2718-6636-609838526248
Output for 5.4.27
1410542930-4886-4028-7445-978451828247
Output for 5.4.26
1410542930-5632-3523-9900-311840581181
Output for 5.4.25
1410542930-6964-3842-8111-340640742178
Output for 5.4.24
1410542930-9361-2821-8583-463222194751
Output for 5.4.23
1410542930-3853-1510-7249-950506252292
Output for 5.4.22
1410542930-5861-2381-6206-322922944902
Output for 5.4.21
1410542930-4259-9507-0975-131340613657
Output for 5.4.20
1410542930-4979-4477-0249-088803099764
Output for 5.4.19
1410542930-9563-8688-1216-208448814954
Output for 5.4.18
1410542930-8451-1304-4526-582670261512
Output for 5.4.17
1410542930-8242-2582-0626-801293092185
Output for 5.4.16
1410542930-4442-0883-6487-444768145018
Output for 5.4.15
1410542930-1981-5778-6757-328808036631
Output for 5.4.14
1410542930-1138-9324-7879-112064314586
Output for 5.4.13
1410542930-7738-1051-4250-088814460180
Output for 5.4.12
1410542930-4536-7442-6608-588754755892
Output for 5.4.11
1410542930-6968-7065-6389-488444874484
Output for 5.4.10
1410542930-9149-2875-4321-595918697153
Output for 5.4.9
1410542930-0890-0016-5119-812504832022
Output for 5.4.8
1410542930-2988-8769-9205-085576458628
Output for 5.4.7
1410542930-3756-3133-7032-691666417615
Output for 5.4.6
1410542930-2714-8634-6186-573573499177
Output for 5.4.5
1410542930-1645-7712-0658-270340234520
Output for 5.4.4
1410542930-4558-0936-2744-991357547767
Output for 5.4.3
1410542930-3207-7911-2898-842793817062
Output for 5.4.2
1410542930-3865-5533-2345-603300858984
Output for 5.4.1
1410542930-9124-8646-8846-804335564110
Output for 5.4.0
1410542930-3158-6330-1220-421260181356
Output for 5.3.29
1410542930-2049-5887-9897-121609419683
Output for 5.3.28
1410542930-3176-3365-4287-018507996344
Output for 5.3.27
1410542930-1478-8861-0807-058991426597
Output for 5.3.26
1410542930-5243-9846-1822-543481199954
Output for 5.3.25
1410542930-0923-1809-8134-986533631640
Output for 5.3.24
1410542930-7674-3861-5890-154416749685
Output for 5.3.23
1410542930-0571-0855-7255-586683140642
Output for 5.3.22
1410542930-3855-6645-5392-549316482484
Output for 5.3.21
1410542930-6208-4068-7585-849496758247
Output for 5.3.20
1410542930-0483-9196-0527-718252506970
Output for 5.3.19
1410542930-8601-2384-0244-062889336458
Output for 5.3.18
1410542930-6751-3158-3248-453215455955
Output for 5.3.17
1410542930-9144-1193-3423-900009125515
Output for 5.3.16
1410542930-0178-7166-7070-986293502863
Output for 5.3.15
1410542930-3942-9772-2921-228930826838
Output for 5.3.14
1410542930-3043-2177-3262-399749479973
Output for 5.3.13
1410542930-0655-3330-8661-224849628891
Output for 5.3.12
1410542930-5984-1088-1335-244630539749
Output for 5.3.11
1410542930-2447-6304-1130-402997668610
Output for 5.3.10
1410542930-6865-1448-6212-235839284140
Output for 5.3.9
1410542930-4114-5885-0946-903277744784
Output for 5.3.8
1410542930-7723-8735-6455-713333132085
Output for 5.3.7
1410542930-1703-3529-2616-651146715573
Output for 5.3.6
1410542930-0429-5994-9718-373188631776
Output for 5.3.5
1410542930-2824-0459-6591-570650300014
Output for 5.3.4
1410542930-7245-4631-3474-365024671287
Output for 5.3.3
1410542930-4837-2970-8040-460403199341
Output for 5.3.2
1410542930-4806-7841-6596-555542139981
Output for 5.3.1
1410542930-1146-7000-8236-981236533508
Output for 5.3.0
1410542930-0264-1886-4102-134502665258
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/RQf8o 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/RQf8o on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/RQf8o on line 4
Process exited with code 255.