PHP hex2bin() Function

PHP hex2bin() function is used to convert a string hexadecimal value to ASCII ccharacters.

Note: This function does not convert a hexadecimal number to a binary number.

Syntax:

ParameterDescriptionRequired/Optional
StringSpecify the hexadecimal value to be converted.required

Example 1

Output:

Hello World!

Example 2

Output:

string(16) "example hex data"

Next TopicPHP String




Latest Courses