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

Link to this page: If you find this page useful, we encourage you to link to this page. Simply copy and paste the code below to your website, blog, or profile.




More 1Keydata Tutorials



PHP addslashes
PHP echo
PHP explode
PHP htmlentities
PHP htmlspecialchars
PHP implode
PHP md5
PHP number_format
PHP print
PHP str_replace
PHP strlen
PHP strpos
PHP strstr
PHP substr
PHP trim

PHP Syntax

PHP Sitemap

PHP Resources