PHP hex2bin() Function

Definition

The hex2bin() function decodes a hexadecimally encoded binary string.

Syntax

PHP hex2bin() Function has the following syntax.

hex2bin(string)

Parameter

Parameter Is Required Description
stringRequired.The hexadecimal value to be converted

Return

PHP hex2bin() Function returns the encoded binary string, or FALSE on failure.

Example

decodes a hexadecimally encoded binary string:


<?php
echo hex2bin("1231FFF23123");
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions