Home » PHP hex2bin() function

PHP hex2bin() function

by Online Tutorials Library

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:

Parameter Description Required/Optional
String Specify the hexadecimal value to be converted. required

Example 1

Output:

Hello World!  

Example 2

Output:

string(16) "example hex data"  

Next TopicPHP String

You may also like