php The md5() function is used to calculate the MD5 hash value of a string. The syntax is md5(string,raw). This function returns an MD5 hash string (a sequence of lowercase hexadecimal characters of length 32 or the raw binary form of length 16).
#php How to use the md5 function?
php The md5() function is used to calculate the MD5 hash value of a string.
Syntax:
md5(string,raw)
Parameters:
string: Required. Specifies the string to be calculated.
raw: Optional. Specifies hexadecimal or binary output format: TRUE - raw 16-character binary format, FALSE - default. 32-character hexadecimal number.
Description: Calculate the MD5 hash of the string
php md5() function example
<?php echo MD5("php.cn"); ?>
Output:
5038249e28843166c820ea820746febc
This This article is an introduction to the PHP md5 function. I hope it will be helpful to friends in need!
The above is the detailed content of How to use php md5 function. For more information, please follow other related articles on the PHP Chinese website!