Table of Contents

Syntax

string md5(string $input [, bool $rawOutput = false ])

(PHP 4, PHP 5)

$input The source content from which to compute an MD5 hash.
$rawOutput If this is set to true, output the result as raw binary.
RETURNS A message digest hash for the source content defined by $input or false if an error occurs.

What it Does

Computes a message digest hash (MD5) for the contents defined by $input. If any error occurs, this method will return false.

Example

// compute an MD5 hash for this script
$md5 = md5_file(__FILE__);
echo 'MD5 hash result: '.$md5;
 
md5.txt · Last modified: 2011/02/11 14:06 by orvado
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki