3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(hex2bin('f0o')); var_dump(hex2bin('f00')); var_dump(hex2bin('fo')); var_dump(hex2bin('f0'));
Output for 5.5.24 - 7.1.0
Warning: hex2bin(): Hexadecimal input string must have an even length in /in/e9Fim on line 2 bool(false) Warning: hex2bin(): Hexadecimal input string must have an even length in /in/e9Fim on line 3 bool(false) Warning: hex2bin(): Input string must be hexadecimal string in /in/e9Fim on line 4 bool(false) string(1) "�"
Output for 5.4.4 - 5.4.45
Warning: hex2bin(): Hexadecimal input string must have an even length in /in/e9Fim on line 2 bool(false) Warning: hex2bin(): Hexadecimal input string must have an even length in /in/e9Fim on line 3 bool(false) bool(false) string(1) "�"
Output for 5.4.0 - 5.4.3
string(1) "�" string(1) "�" bool(false) string(1) "�"
Output for 5.0.0 - 5.3.29
Fatal error: Call to undefined function hex2bin() in /in/e9Fim on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hex2bin() in /in/e9Fim on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hex2bin() in /in/e9Fim on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hex2bin() in /in/e9Fim on line 2