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, 3077🔥, 0💬
Popular Posts:
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
Why am I getting this "Docker failed to initialize" error? After installing the latest version of Do...
How to create a "Sign-up or Sign-in" user flow policy in my Azure AD B2C directory? If you want to b...
How to validate the id_token signature received from Azure AD v2.0 authentication response? You can ...
How to run CMD Commands in Dockerfile to change Windows Docker images? When building a new Windows i...