hex2bin()
Published May 12, 2023
Contribute to Docs
The hex2bin()
function converts a string of hexadecimal values to its binary representation.
Note: This function does NOT convert a hexadecimal number to a binary number. The
hex2bin()
function is available only in PHP 5.4.0 and later versions.
Syntax
hex2bin(hex_string);
The hex_string
parameter represents the string of hexadecimal values to be converted.
Codebyte Example
The following example shows how to use the hex2bin()
function:
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.