Tools, FAQ, Tutorials:
Converting Strings to Hex Numbers in PHP
How To Convert Strings to Hex Numbers?
✍: FYIcenter.com
If you want convert a string into hex format, you can use the bin2hex() function. Here is a PHP script on how to use bin2hex():
<?php $string = "Hello\tworld!\n"; print($string."\n"); print(bin2hex($string)."\n"); ?>
This script will print:
Hello world! 48656c6c6f09776f726c64210a
⇒ Generating Character from ASCII Value in PHP
⇐ Comparing Two Strings with strcmp() in PHP
2016-10-13, ∼3523🔥, 0💬
Popular Posts:
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...
How to build a test service operation to dump everything from the "context.Request" object in the re...
How to use 'choose ... when ..." policy statements to control execution flows? If you want to contro...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...