PHP md5() function

This function is used to generate hash value of a string.

Syntax

md5(string);

String is the required parameter. It returns hash value of the given string.

Example1

<?php
    $str = 'Hello world';
    echo md5($str);
?>

Output -

3e25960a79dbc69b674cd4ec67a72c62

Example2

<?php
    $num1 = '1001';
    echo md5($num1);
?>

Output -

b8c37e33defde51cf91e1e03e51657da



Related PHP Functions

PHP array_reverse() function
PHP array_diff() function
PHP array_key_exists() function
PHP array_push() function
PHP array_search() function
PHP class_exists() function
PHP curl_setopt() function
PHP die() function
PHP dirname() function
PHP each() function
PHP explode() function
PHP file_exists() function
PHP function_exists() function
PHP getenv() function
PHP is_readable() function
PHP ksort() function
PHP mkdir() function
PHP ob_start() function
PHP parse_url() function
PHP str_repeat() function
PHP substr() function




Read more articles


General Knowledge



Learn Popular Language