note 86186 deleted from function.hash by danbrown
| From: | danbrown@php.net | Date: | Sat, 14 Mar 2009 14:48:55 +0000 |
| Subject: | note 86186 deleted from function.hash by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151895@lists.php.net to get a copy of this message | ||
Note Submitter: kristoffe dot brodeur at verizon dot net
----
Comparison between hash algorithms.
<?php
$algos = hash_algos();
$word="hola";
foreach($algos as $algo)
{
echo $algo.": ";
$time=microtime(1);
echo hash($algo, $word);
echo "<br>".(microtime(1)-$time)."<br><hr>";
}
?>
unless you set your server up specially, you have to use
<?php and not <? at the beginning, or the code will spit out as html without any php
processed. so make note of that.