English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String String Functions Manual
hex2The bin() function is used to convert the string of hexadecimal values to ASCII characters.
string hex2bin( string $data )
Used to convert hexadecimal strings to ASCII characters
Returns the converted ASCII characters, if the conversion fails it returns FALSE, and the original hexadecimal value string will not change.
Note: If the input hexadecimal string is of odd length or an invalid hexadecimal string, an E_WARNING level error will be thrown.
Serial Number | Parameters and Description |
---|---|
1 | data It contains information about the hexadecimal representation of data |
Try the following example to convert hexadecimal values to ASCII characters:
<?php //Convert Hexadecimal Values to ASCII Characters $hex = hex2bin("43480170); var_dump($hex); ?>Test and See‹/›
Output Result-
string(4) "CHp"