PHP md5 Function



PHP Tutorial > String Functions > md5 Function

The md5 function in PHP is used to calculate the md5 hash of a string. It is commonly used to encrypt a string.

The syntax of the md5 function is:

md5 ('string', [raw_output])

string is the string to be encrypted. [raw_output] is optional and specifies the output format. It is a boolean parameter which can either be TRUE or FALSE. The default is FALSE.

Let's take a look at the example below:

Example

print md5('1');

Result:

c4ca4238a0b923820dcc509a6f75849b

Next: PHP number_format Function



Copyright © 2023   1keydata.com  All Rights Reserved.  Privacy Policy   About   Contact