The md5() function produces a data checksum in 32-bytes. "MD" stands for Message Digest.
PHP md5() Function has the following syntax.
string md5 ( string str [, bool raw_output] )
Parameter | Is Required | Description |
---|---|---|
string | Required. | The string to be calculated |
raw | Optional. | Hex or binary output format: |
Possible values for raw.
PHP md5() Function returns the string for the checksum.
Get the checksum for a string
<?PHP
$md5hash = md5("java2s.com");
print $md5hash;
?>
The code above generates the following result.