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)[0]; 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
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 dbe5265c14024640a694150fcb29bec6 32 ��&\F@���)�� 16 0
Output for 7.0.14
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 9cc6723b0190487289e569613946df10 32 ��r;�Hr��ia9F� 16 0
Output for 7.0.6
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 ff30ac679be94b8db12735e0956ffa6d 32 �0�g��K��'5�o�m 16 0
Output for 7.0.5
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3f8d23dd5a4d449daee2946c87dd5904 32 ?�#�ZMD���l��Y 16 0
Output for 7.0.4
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 5e83fe9bdbde487281bcbd10a6751ca5 32 ^�����Hr����u� 16 0
Output for 7.0.3
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 e8a18f120dca4b478fe196aa21b7aee3 32 衏 �KG�ᖪ!��� 16 0
Output for 7.0.2
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 a6a787d7d87d424fb97066e206d84959 32 �����}BO�pf��IY 16 0
Output for 7.0.1
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 87a48d96ae9f45a480b1e455ef7124fe 32 ������E����U�q$� 16 0
Output for 7.0.0
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 cb32854b02984a18a95bfa9e7eecfd2f 32 �2�K�J�[��~�/ 16 0
Output for hhvm-3.12.0
Notice: Undefined index: 0 in /in/Y5BA7 on line 21 341d4bdcd7e141d199b095c2d07a2196 32 4K���Aљ����z!� 16 0
Output for hhvm-3.10.0
Notice: Undefined index: 0 in /in/Y5BA7 on line 21 8199be49e13249c492ddc96144de0425 32 ���I�2IĒ��aD�% 16 0
Output for 5.6.28
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 d3e8c2c7c2d04daa954cbfd36fb27377 32 ������M��L��o�sw 16 0
Output for 5.6.21
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 ac8dd7a97ee3421b80f9e5a71b2be88d 32 ��ש~�B���+� 16 0
Output for 5.6.20
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 09e7159da05e470788f05bb7b0246594 32 ���^G��[��$e� 16 0
Output for 5.6.19
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 a700fee53c494636bab729bb20cd2ac5 32 ���<IF6��)� �*� 16 0
Output for 5.6.18
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 382d1b538a95499b9b1d921ad2c0df5a 32 8-S��I�����Z 16 0
Output for 5.6.17
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 854f86061fef41e7971ff925ac2738c1 32 �O��A��%�'8� 16 0
Output for 5.6.16
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 cd32ee68493e4acc8222f201b8c2e27e 32 �2�hI>Ĵ"����~ 16 0
Output for 5.6.15
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 e9d384f5f246429593cb53fb215a31f2 32 �ӄ��FB���S�!Z1� 16 0
Output for 5.6.14
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 cbbd6e88f19a47c1a26ebf62043b3818 32 ˽n��G��n�b;8 16 0
Output for 5.6.13
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 fb3a8e74ad374a219967e4b6806357c4 32 �:�t�7J!�g䶀cW� 16 0
Output for 5.6.12
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3cbe7a820feb40afbc5585c34270bdb7 32 <�z��@��U��Bp�� 16 0
Output for 5.6.11
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 5a070a5dd1c34a6890cf954078b8348b 32 Z ]��Jh�ϕ@x�4� 16 0
Output for 5.6.10
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 bd8fc13b682648c99349fc0df81fef96 32 ���;h&HɓI� �� 16 0
Output for 5.6.9
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 6a2b80fd35654155be53b52b2e000e7f 32 j+��5eAU�S�+. 16 0
Output for 5.6.8
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 0319b5c1d72b4aaa9cc29bbbffd5a845 32 ���+J��›��ըE 16 0
Output for 5.6.7
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 7247004634e74592ae110d689a3f46f6 32 rGF4�E�� h�?F� 16 0
Output for 5.5.35
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 09fafd5614fb4e4ab759adfada59f7ae 32 ��V�NJ�Y���Y�� 16 0
Output for 5.5.34
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 48cfb3a766c1442e8cb9289f7946e0f6 32 Hϳ�f�D.��(�yF� 16 0
Output for 5.5.33
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 dc76355556c24ce5a8d51271fa1e5b52 32 �v5UV�L��q�[R 16 0
Output for 5.5.32
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 2d1c322b510d4239af4560c7ce51d05e 32 -2+Q B9�E`��Q�^ 16 0
Output for 5.5.31
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 850f6b1046644345b0844ddd3f79c62b 32 �kFdCE��M�?y�+ 16 0
Output for 5.5.30
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 23b5186fdaab46eca4953e96b4726ecd 32 #�oګF줕>��rn� 16 0
Output for 5.5.29
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 0e19a94f4cab41bb93060103d73fced6 32 �OL�A���?�� 16 0
Output for 5.5.28
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 361fff1535d94ab6ae07eef41d6e750a 32 6�5�J����nu 16 0
Output for 5.5.27
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 8c675c476e874a4d9b3798c20f95d0e7 32 �g\Gn�JM�7����� 16 0
Output for 5.5.26
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3b3bf77b5e5842239c9ec2d0619a4eec 32 ;;�{^XB#����a�N� 16 0
Output for 5.5.25
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 00b415e54c2a445381d157b1b16068fc 32 ��L*DS��W��`h� 16 0
Output for 5.5.24
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 a349a37a989649a8837c97248c8c1cb2 32 �I�z��I��|�$��� 16 0
Output for 5.4.45
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 a5a56786b7124fb19b60aa4f56538e42 32 ��g��O��`�OVS�B 16 0
Output for 5.4.44
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3ced7bc4c6574725a53b13a3fbea2135 32 <�{��WG%�;���!5 16 0
Output for 5.4.43
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 6125597eeb8a495191cfabeaf8276ebb 32 a%Y~�IQ�ϫ�'n� 16 0
Output for 5.4.42
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 da15a29329f74555beb17e3427c53786 32 ���)�EU��~4'�7� 16 0
Output for 5.4.41
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 df3949d26ed84c8b987728715326677e 32 �9I�n�L��w(qS&g~ 16 0
Output for 5.4.40
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 4b07cce208dc4d369f0c978e96df5d44 32 K���M6� ����]D 16 0
Output for 5.4.39
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3f62f97e72a04bd68c34194a4b9bdb66 32 ?b�~r�K֌4JK��f 16 0
Output for 5.4.38
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 5de63b7c063249e4a7136dcb98dc3c20 32 ]�;|2I�m˘�< 16 0
Output for 5.4.37
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 27c2f766bb2a4d93ac04eca92a9da2bb 32 '�f�*M���*��� 16 0
Output for 5.4.36
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 7f5f6a4d36eb4ee38843b9cb1e87517f 32 _jM6�N�C���Q 16 0
Output for 5.4.35
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 ff1ed759566644e39845bb0bac43617c 32 ��YVfD�E� �Ca| 16 0
Output for 5.4.34
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 82e8c779373b4aaaac2eae4cc2bbc9f2 32 ���y7;J��.�L»�� 16 0
Output for 5.4.32
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 fa225606c6384420aa51453db61b8582 32 �"V�8D �QE=��� 16 0
Output for 5.4.31
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 090d53bc681944938789448a03f879dd 32 S�hD���D��y� 16 0
Output for 5.4.30
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 dad994d866624189906b5cce81771345 32 �ٔ�fbA��k\΁wE 16 0
Output for 5.4.29
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 d08990a874db4b50a0ab3a6cdbeafd4e 32 Љ��t�KP��:l��N 16 0
Output for 5.4.28
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 69c101f1201347ac8ebddb423436f37f 32 i�� G����B46� 16 0
Output for 5.4.27
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 c2c890ffe66745218432ba7eb733869c 32 �Ȑ��gE!�2�~�3�� 16 0
Output for 5.4.26
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 cb675774332348cab461ce41474ce3d9 32 �gWt3#Hʴa�AGL�� 16 0
Output for 5.4.25
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 90cd026a5697482a90e48b058a5d6a9d 32 ��jV�H*���]j� 16 0
Output for 5.4.24
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 0ebe7986a5bc47d5ab128b31de5ab934 32 �y���Gի�1�Z�4 16 0
Output for 5.4.23
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 6bd88799875a4a9cbe76917c9dfb52d8 32 k؇��ZJ��v�|��R� 16 0
Output for 5.4.22
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 ab1fcf3535fe45a7a1ff23f6b0c97433 32 ��55�E���#���t3 16 0
Output for 5.4.21
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 f7ac38362185431d9bd49bc339fef76a 32 ��86!�C�ԛ�9��j 16 0
Output for 5.4.20
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 1088254ff69b49a69fb653d6cd303ceb 32 �%O��I���S��0<� 16 0
Output for 5.4.19
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 b75af1d73b9e4e7eb9413531ee861841 32 �Z��;�N~�A51�A 16 0
Output for 5.4.18
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 49dccf7da6c6443f8f1a5e86fbc5ad61 32 I��}��D?�^��ŭa 16 0
Output for 5.4.17
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 70b7cbbaad0c488d9b3e50e5a1fb83bc 32 p�˺� H��>P��� 16 0
Output for 5.4.16
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 d76fb213d30b4d989a15901de1ee9f41 32 �o�� M�����A 16 0
Output for 5.4.15
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 6a7db5c957b54eb090d421757b7144f2 32 j}��W�N���!u{qD� 16 0
Output for 5.4.14
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 1a8d5cf56bdf457fa2fe163966700491 32 �\�k�E��9fp� 16 0
Output for 5.4.13
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 8f57ca1e32f54895b85d7d4c66441ec8 32 �W�2�H��]}LfD� 16 0
Output for 5.4.12
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 fbede4e0a07c42deb06134d8a8497b6e 32 ����|Bްa4بI{n 16 0
Output for 5.4.11
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 7c0b3d6e94614400905e4cae6f02754a 32 | =n�aD�^L�ouJ 16 0
Output for 5.4.10
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 7e704bf1dd3b49d494b6c23448955bb4 32 ~pK��;IԔ��4H�[� 16 0
Output for 5.4.9
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 11f3a21087ac492eb4a1e8041bfd593e 32 ���I.����Y> 16 0
Output for 5.4.8
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 c325b44c835e4c62933d5eb4b6bf3bde 32 �%�L�^Lb�=^���;� 16 0
Output for 5.4.7
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 3d8707b23ade4668bb616e410d866621 32 =��:�Fh�anA �f! 16 0
Output for 5.4.6
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 79ebecac616e430e9bdb7b408f7bae7a 32 y��anC��{@�{�z 16 0
Output for 5.4.5
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 1162c3b05e3846839c2fa29b7c37b5c3 32 bð^8F��/��|7�� 16 0
Output for 5.4.4
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 07c7a532ffe348c98049e586b30a4dc5 32 ǥ2��HɀI决 M� 16 0
Output for 5.4.3
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 b5f21ecae3314c3197a5d55aa99299b9 32 ����1L1���Z���� 16 0
Output for 5.4.2
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 e247640d14b9457c990c1415b6c9c1eb 32 �Gd �E|� ��� 16 0
Output for 5.4.1
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 bb2cf32036f24145b60362ba0bd80904 32 �,� 6�AE�b� �  16 0
Output for 5.4.0
Notice: Undefined offset: 0 in /in/Y5BA7 on line 21 01904af7a9d440e2a38355a76231036a 32 �J���@⣃U�b1j 16 0
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Y5BA7 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/Y5BA7 on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Y5BA7 on line 21
Process exited with code 255.