Definition
The md5() function calculates the MD5 hash of a string.
Syntax
md5(string, raw)
Parameters
Parameter | Description |
---|---|
string |
Required. The string to be calculated. |
raw |
Optional. Specifies hex or binary output format:true - Raw 16 character binary formatfalse - Default. 32 character hex number |
Example
<?php
$str = "Welcome!";
echo md5($str);