PHP hex2bin() Function

PHP fprintf() Function
PHP hebrevc() Function

In this article, you will learn how to convert hexadecimal string to ASCII characters. The hex2bin() function convert the string of hexadecimal values to ASCII characters.

What is the syntax of the HEX2BIN() function?

hex2bin(string)
ParametersDetails
stringThe value in hexadecimal to convert to ASCII character – Required
PHP hex2bin() method

examples of the HEX2BIN() function

Example 1. In this example, we convert a hexadecimal value to ASCII character.

<?php
echo hex2bin("84566f6c6f20576f726c44221");
?>
PHP fprintf() Function
PHP hebrevc() Function
en English
X
Scroll to Top