3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $uuid = sprintf('%04x%04x%04x%04x%04x%04x%04x%04x', // 32 bits for "time_low" mt_rand(0, 0xffff), mt_rand(0, 0xffff), // 16 bits for "time_mid" mt_rand(0, 0xffff), // 16 bits for "time_hi_and_version", // four most significant bits holds version number 4 mt_rand(0, 0x0fff) | 0x4000, // 16 bits, 8 bits for "clk_seq_hi_res", // 8 bits for "clk_seq_low", // two most significant bits holds zero and one // for variant DCE1.1 mt_rand(0, 0x3fff) | 0x8000, // 48 bits for "node" mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) ); $packedUuid = pack('H*', $uuid); $unpackedUuid = unpack('H*', $packedUuid)[1]; echo $uuid . PHP_EOL; echo strlen($uuid) . PHP_EOL; echo $packedUuid . PHP_EOL; echo strlen($packedUuid) . PHP_EOL; echo $unpackedUuid . PHP_EOL; echo strlen($unpackedUuid) . PHP_EOL;
Output for 7.1.0
144eb48042fc459298b50341eada40c9 32 N��B�E���A��@� 16 144eb48042fc459298b50341eada40c9 32
Output for 7.0.14
60a5841c4bc649e78a29a1d483af35c1 32 `��K�I�)�ԃ�5� 16 60a5841c4bc649e78a29a1d483af35c1 32
Output for 7.0.6
bbe5732e147b4ddaa85586f235aea2e6 32 ��s.{MڨU��5��� 16 bbe5732e147b4ddaa85586f235aea2e6 32
Output for 7.0.5
1eb13e4b40814d3f82422a5b6adc1c9b 32 �>K@�M?�B*[j�� 16 1eb13e4b40814d3f82422a5b6adc1c9b 32
Output for 7.0.4
07efc5cdfb6c4e4d8b7d73a1e9e04623 32 ���lNM�}s���F# 16 07efc5cdfb6c4e4d8b7d73a1e9e04623 32
Output for 7.0.3
180cc46ffab240a9bb3f67afa347f0d7 32  �o��@��?g��G�� 16 180cc46ffab240a9bb3f67afa347f0d7 32
Output for 7.0.2
8b7e5b3e70ee4083b0eba2d05cbf7656 32 �~[>p�@����\�vV 16 8b7e5b3e70ee4083b0eba2d05cbf7656 32
Output for 7.0.1
9a6b27ca5d7b4f6ca98bd1cd8cbaddf1 32 �k'�]{Ol���͌��� 16 9a6b27ca5d7b4f6ca98bd1cd8cbaddf1 32
Output for 7.0.0
3ffbe12160f948ce8b1c844de5db823a 32 ?��!`�H΋�M�ۂ: 16 3ffbe12160f948ce8b1c844de5db823a 32
Output for hhvm-3.12.0
6fe6aaf23e114107916509e98cb665f0 32 o��>A�e 錶e� 16 6fe6aaf23e114107916509e98cb665f0 32
Output for hhvm-3.10.0
d9ee2bcd9b504bbf940188bebd264e27 32 ��+͛PK�����&N' 16 d9ee2bcd9b504bbf940188bebd264e27 32
Output for 5.6.28
29a3654d05914e52b51fe326a2757dc2 32 )�eM�NR��&�u}� 16 29a3654d05914e52b51fe326a2757dc2 32
Output for 5.6.21
023c7f8ccb1e481b8852a9f845bf942d 32 <��H�R��E��- 16 023c7f8ccb1e481b8852a9f845bf942d 32
Output for 5.6.20
ab97d92133c241a9b412a73807d524d1 32 ���!3�A���8�$� 16 ab97d92133c241a9b412a73807d524d1 32
Output for 5.6.19
0bee08532b2f4058bf9a03bc2cd8268f 32 �S+/@X���,�&� 16 0bee08532b2f4058bf9a03bc2cd8268f 32
Output for 5.6.18
95465460098c44aab99d42ad2e5a58a8 32 �FT` �D���B�.ZX� 16 95465460098c44aab99d42ad2e5a58a8 32
Output for 5.6.17
96e7f4729ac343df8c943215b8cc9e15 32 ���r��Cߌ�2�̞ 16 96e7f4729ac343df8c943215b8cc9e15 32
Output for 5.6.16
b4bdc1cce42c4043bc6dcb08bbd89e7b 32 �����,@C�m��؞{ 16 b4bdc1cce42c4043bc6dcb08bbd89e7b 32
Output for 5.6.15
3426f1d53aec430b9d0f4d5cf1e3daa7 32 4&��:�C �M\��ڧ 16 3426f1d53aec430b9d0f4d5cf1e3daa7 32
Output for 5.6.14
b65b45d8977b4fabaf8635751c514064 32 �[Eؗ{O���5uQ@d 16 b65b45d8977b4fabaf8635751c514064 32
Output for 5.6.13
d7e874e64d23491cb62f5dd9fdbd3ba1 32 ��t�M#I�/]��;� 16 d7e874e64d23491cb62f5dd9fdbd3ba1 32
Output for 5.6.12
3a873c4c9f3c48c4bb9385df71f75f48 32 :�<L�<HĻ���q�_H 16 3a873c4c9f3c48c4bb9385df71f75f48 32
Output for 5.6.11
76a7d1ad909a41e1aef86e200ee8b6ba 32 v�ѭ��A�n 趺 16 76a7d1ad909a41e1aef86e200ee8b6ba 32
Output for 5.6.10
85b8d09a92aa4a35854e223c5d3f3275 32 ����J5�N"<]?2u 16 85b8d09a92aa4a35854e223c5d3f3275 32
Output for 5.6.9
d3ef4767a7074e7ca679caec2a59def4 32 ��Gg�N|�y��*Y�� 16 d3ef4767a7074e7ca679caec2a59def4 32
Output for 5.6.8
779878ec745f4afea6628475d9823141 32 w�x�t_J��b�uق1A 16 779878ec745f4afea6628475d9823141 32
Output for 5.6.7
d114429faa8645d8b9a8cfd864f6d582 32 �B���Eع���d�Ղ 16 d114429faa8645d8b9a8cfd864f6d582 32
Output for 5.5.35
e616e606e3f244ca8004fe42583da17a 32 ����Dʀ�BX=�z 16 e616e606e3f244ca8004fe42583da17a 32
Output for 5.5.34
e278eff2a94248978d406e450206c5a4 32 �x��BH��@nEŤ 16 e278eff2a94248978d406e450206c5a4 32
Output for 5.5.33
275f3134e27a4b8cb925aee10c5f3bcc 32 '_14�zK��%�� _;� 16 275f3134e27a4b8cb925aee10c5f3bcc 32
Output for 5.5.32
2099f925efb046228ad0ef997b4a2494 32 ��%�F"���{J$� 16 2099f925efb046228ad0ef997b4a2494 32
Output for 5.5.31
c9bcb99774f34758b41fe0271ad0e096 32 ɼ��t�GX��'�� 16 c9bcb99774f34758b41fe0271ad0e096 32
Output for 5.5.30
1f67ba0585454ea8b9ff66ba4ae69bbe 32 g��EN���f�J曾 16 1f67ba0585454ea8b9ff66ba4ae69bbe 32
Output for 5.5.29
1b98f73108b141be910bdbf233363dcb 32 ��1�A�� ��36=� 16 1b98f73108b141be910bdbf233363dcb 32
Output for 5.5.28
0065d370bf24490a87fa8ae00e027212 32 e�p�$I ����r 16 0065d370bf24490a87fa8ae00e027212 32
Output for 5.5.27
2677030abc944339b7ba0151231463a8 32 &w ��C9��Q#c� 16 2677030abc944339b7ba0151231463a8 32
Output for 5.5.26
705a040fc70b486cb76d861f1118d28d 32 pZ� Hl�m�ҍ 16 705a040fc70b486cb76d861f1118d28d 32
Output for 5.5.25
6baf9c5511c94decaaaf6fab902b6df5 32 k��U�M쪯o��+m� 16 6baf9c5511c94decaaaf6fab902b6df5 32
Output for 5.5.24
9439ec37380745699f10084fce0089f0 32 �9�78Ei�O��� 16 9439ec37380745699f10084fce0089f0 32
Output for 5.4.45
c98b2231d3354c768cedffd998736c78 32 ɋ"1�5Lv��٘slx 16 c98b2231d3354c768cedffd998736c78 32
Output for 5.4.44
cb03bd24d1c248178c2cce28641f105d 32 ��$��H�,�(d] 16 cb03bd24d1c248178c2cce28641f105d 32
Output for 5.4.43
cb5c40eb7f394c70bedcf431ef1f8fb9 32 �\@�9Lp���1��� 16 cb5c40eb7f394c70bedcf431ef1f8fb9 32
Output for 5.4.42
2626a378000d4000a3b7f4f5351a88b9 32 &&�x @���5�� 16 2626a378000d4000a3b7f4f5351a88b9 32
Output for 5.4.41
7d72844d51f5498e9f5741870ee6e7b4 32 }r�MQ�I��WA��� 16 7d72844d51f5498e9f5741870ee6e7b4 32
Output for 5.4.40
6f592a0f965d46e8902e9d7b4a629bc4 32 oY*�]F�.�{Jb�� 16 6f592a0f965d46e8902e9d7b4a629bc4 32
Output for 5.4.39
48e7613be79a4fa19e68d4ad0b91b038 32 H�a;�O��hԭ ��8 16 48e7613be79a4fa19e68d4ad0b91b038 32
Output for 5.4.38
92076d2ef16d4a96853e3c5396f73519 32 �m.�mJ��><S��5 16 92076d2ef16d4a96853e3c5396f73519 32
Output for 5.4.37
ba19191d3bae47d6acb4c6855f355934 32 �;�G֬�ƅ_5Y4 16 ba19191d3bae47d6acb4c6855f355934 32
Output for 5.4.36
afa8fd2c9b1f4befbf29ed8ae47bce3d 32 ���,�K�)��{�= 16 afa8fd2c9b1f4befbf29ed8ae47bce3d 32
Output for 5.4.35
bc6b6583e21b4438b78a13cb546e3004 32 �ke��D8���Tn0 16 bc6b6583e21b4438b78a13cb546e3004 32
Output for 5.4.34
98869f58afc442b3a683e8e8e1c97ca9 32 ���X��B�������|� 16 98869f58afc442b3a683e8e8e1c97ca9 32
Output for 5.4.32
76ab245625f04abb86ac9a323a0a55c7 32 v�$V%�J����2: U� 16 76ab245625f04abb86ac9a323a0a55c7 32
Output for 5.4.31
ad730168f29149b499f1855292af9987 32 �sh�I���R���� 16 ad730168f29149b499f1855292af9987 32
Output for 5.4.30
23790fca3141422a8e2a73145ceec8ea 32 #y�1AB*�*s\��� 16 23790fca3141422a8e2a73145ceec8ea 32
Output for 5.4.29
187eb5bf7dde4305926007bf3ea4cfd3 32 ~��}�C�`Ovp6P�>��� 16 187eb5bf7dde4305926007bf3ea4cfd3 32
Output for 5.4.28
31387f57aaaa448ebb70abe2111d3b0a 32 18W��D��p��; 16 31387f57aaaa448ebb70abe2111d3b0a 32
Output for 5.4.27
0613ca0b18604814828893eae6e68af5 32 5.4.27� `H������ 16 0613ca0b18604814828893eae6e68af5 32
Output for 5.4.26
3fb9ea2bed3d474792e5ecde48a64f07 32 ?��+�=GG����H�OOvp6P 16 3fb9ea2bed3d474792e5ecde48a64f07 32
Output for 5.4.25
b01fc36115fc428f8c4efdb1ec38d929 32 ��a�B��N���8�) 16 b01fc36115fc428f8c4efdb1ec38d929 32
Output for 5.4.24
4587ca6f2b444d88aa7ad343938f8a90 32 E��o+DM��z�C���� 16 4587ca6f2b444d88aa7ad343938f8a90 32
Output for 5.4.23
f21d2ca4403f4141a813c3d0bd7034a4 32 �,�@?AA��нp4� 16 f21d2ca4403f4141a813c3d0bd7034a4 32
Output for 5.4.22
20b8693223f84383985b1ea7fbcf619a 32 �i2#�C��[���a� 16 20b8693223f84383985b1ea7fbcf619a 32
Output for 5.4.21
85cbcdb5fd1f4999ba060ee2a119401f 32 ��͵�I��5.4.21�@ 16 85cbcdb5fd1f4999ba060ee2a119401f 32
Output for 5.4.20
abf6ecaddde6406cbcdc79f8ba9d3715 32 �����@l��y���7 16 abf6ecaddde6406cbcdc79f8ba9d3715 32
Output for 5.4.19
57d0f5d8cb1241e18b19f5dfb72ed7f5 32 W���A��߷.� 16 57d0f5d8cb1241e18b19f5dfb72ed7f5 32
Output for 5.4.18
b3fe626b3548455a934b877900c9c080 32 ��bk5HEZ�K�y�� 16 b3fe626b3548455a934b877900c9c080 32
Output for 5.4.17
de60f42520db43c88dfd27639c431984 32 �`�% �Cȍ�'c�C� 16 de60f42520db43c88dfd27639c431984 32
Output for 5.4.16
4b2cf04995e0405ea94c8505f987d718 32 K,�I��@^�L���� 16 4b2cf04995e0405ea94c8505f987d718 32
Output for 5.4.15
c562bd842ec641e08244104d05472f36 32 �b��.�A�DMG/6 16 c562bd842ec641e08244104d05472f36 32
Output for 5.4.14
7626068199f14f6fb60a4d46925a3453 32 v&5.4.14���Oo� MF�Z4S 16 7626068199f14f6fb60a4d46925a3453 32
Output for 5.4.13
ee84bed99ef74f6bbb1ca9e776d36c4b 32 ٞ�Ok���v�lK 16 ee84bed99ef74f6bbb1ca9e776d36c4b 32
Output for 5.4.12
fd54a395bcd541f78b1608fcbc208e38 32 �T����A���� �8 16 fd54a395bcd541f78b1608fcbc208e38 32
Output for 5.4.11
7b38092230494ad5b047f7e9df2bff44 32 {8 "0IJհG���+�D 16 7b38092230494ad5b047f7e9df2bff44 32
Output for 5.4.10
aa04c851b30943c3bc453fe37364f6f7 32 ��Q� CüE?�sd�� 16 aa04c851b30943c3bc453fe37364f6f7 32
Output for 5.4.9
dbaf9cd778ea4ae89528484d25703f64 32 ۯ��x�J�(HM%p?d 16 dbaf9cd778ea4ae89528484d25703f64 32
Output for 5.4.8
99ef38f678f245a4bd25ad4238b09c06 32 ��8�x�E��%�B8��5.4.8 16 99ef38f678f245a4bd25ad4238b09c06 32
Output for 5.4.7
de28d09198b7434a8cc7648571356401 32 �(Б��CJ��d�q5d 16 de28d09198b7434a8cc7648571356401 32
Output for 5.4.6
76438690666b4f91a2c97bd79c8c5efd 32 vC��fkO���{ל�^� 16 76438690666b4f91a2c97bd79c8c5efd 32
Output for 5.4.5
a47a49ec7cf34d4f987f9a3e6ba31379 32 �zI�|�MO��>k�y 16 a47a49ec7cf34d4f987f9a3e6ba31379 32
Output for 5.4.4
bb9c56ee2b1d49e38ac26d6f91309732 32 ��V�+I��mo�0�2 16 bb9c56ee2b1d49e38ac26d6f91309732 32
Output for 5.4.3
f800275322d34bfcaf6da705b77246eb 32 �'S"�K��m��rF� 16 f800275322d34bfcaf6da705b77246eb 32
Output for 5.4.2
5809e5cf5dd74d179dff824e86bfa775 32 X ��]�M���N���u 16 5809e5cf5dd74d179dff824e86bfa775 32
Output for 5.4.1
4a09e620033747d29addfc81065c914b 32 J � 7GҚ��5.4.1\�K 16 4a09e620033747d29addfc81065c914b 32
Output for 5.4.0
a42c0efbe3b04fa6b8fb0a0a4afe7aa6 32 �,��O��� J�z� 16 a42c0efbe3b04fa6b8fb0a0a4afe7aa6 32
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Ovp6P on line 21
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 '[' in /in/Ovp6P on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Ovp6P on line 21
Process exited with code 255.