PHP hex2bin() Function
In this chapter you will learn:
- Definition for PHP hex2bin() Function
- Syntax for PHP hex2bin() Function
- Parameter for PHP hex2bin() Function
- Return for PHP hex2bin() Function
- Example - decodes a hexadecimally encoded binary string
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 |
---|---|---|
string | Required. | 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");
?>
Next chapter...
What you will learn in the next chapter:
- Definition for PHP html_entities() Function
- Syntax for PHP html_entities() Function
- Parameter for PHP html_entities() Function
- Options for PHP html_entities() Function
- Charset for PHP html_entities() Function
- Return for PHP html_entities() Function
- Note for PHP html_entities() Function
- Example - Convert string to HTML friendly
Home » PHP Tutorial » PHP String Functions