PHP md5() Function Example

PHP Script:

echo md5($str);




PHP md5() function calculates the MD5 hash of a string.
This function returns the calculated MD5 hash on success, or FALSE on failure.
It can be used to store password in database as encrypted form [md5 hash].

PHP md5 function parameters:

1- String: String for which md5 hash is going to be calculated.
2- Bolean value [optional]:
TRUE is for Raw 16 character binary format.
FALSE is for 32 character hex number.
By default value is FALSE.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s