• PHP Video Tutorials

PHP - Function Md5



Syntax

string md5 ( string $str [, bool $raw_output = false ] )

Definition and Usage

It is used to calculates the md5 hash of a string

Return Values

It returns the hash as a 32-character hexadecimal number

Parameters

Sr.No Parameters & Description
1

str

It contains the information about string.

2

raw_output

When TRUE, returns the digest in raw binary format with a length of 16.

Example

Try out the following example

<?php
   $str = "tutorialspoint";
   
   echo md5($str);
?>

This will produce following result −

6c60b3cfe5124f982eb629e00a98f01f
php_function_reference.htm
Advertisements