PHP Tutorial
PHP md5() function, run and write PHP code.
PHP md5() function - online editor.
md5 — Calculate the md5 hash of a string
Syntax:
md5(string,raw);
md5 — Returns the hash as a 32-character hexadecimal number.
Tags: Syntax:
md5(string,raw);
md5 — Returns the hash as a 32-character hexadecimal number.
Example 1 Calculate the MD5 hash of the string "Nice day"::
<?php
$e_str = "Nice day";
echo md5($e_str);
?>
Exemple : Print the result of md5():
<?php
$e_str = "Hello";
echo "The string: ".$e_str."<br>";
echo "TRUE - Raw 16 character binary format: ".md5($e_str, TRUE)."<br>";
echo "FALSE - 32 character hex number: ".md5($e_str)."<br>";
?>
Exemple : Print the result of md5() and then test it::
<?php
$e_str = "Nice day";
echo md5($e_str);
if (md5($e_str) == "36aa4e4a4239ae125c3c9fdbc8e0c512")
{
echo "<br>Have a nice day!";
exit;
}
?>
PHP md5 () function 31
PHP md5() function
PHP Functons
PHP count() FunctionPHP define() function
PHP empty() Function
PHP explode() function
PHP html_entity_decode() function
PHP htmlentities() function
PHP htmlspecialchars_decode() function
PHP htmlspecialchars() function
PHP implode() function
PHP isset() Function
PHP lcfirst() function
PHP ltrim() function
PHP md5() function
PHP print() function
PHP printf() function
PHP rtrim() function
PHP similar_text() function
PHP str_repeat() function
PHP str_replace() function
PHP str_split() function
PHP strcmp() function
PHP strip_tags() function
PHP strlen online function
PHP strrchr() Function
PHP strstr() function
PHP strtolower() function
PHP strtoupper() function
PHP substr() function
PHP trim() function
PHP ucfirst() function