3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $parts = explode (":", "FF:01:48:00:011E:0022:06BC:0000:000A:0784" ); foreach ($parts as $part) { echo bindec(hex2bin("0x". $part)); }
based on sja8I
Output for 5.5.24 - 7.2.0
Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0 Warning: hex2bin(): Input string must be hexadecimal string in /in/tPDEf on line 6 0
Output for 5.4.0 - 5.4.45
0000000000
Output for 5.0.0 - 5.3.29
Fatal error: Call to undefined function hex2bin() in /in/tPDEf on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: hex2bin() in /in/tPDEf on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: hex2bin() in /in/tPDEf on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: hex2bin() in /in/tPDEf on line 6