6 * Note: I could use mhash_count() here but I like to see unavailable hashers
7 * because this is important to me to choose the most-available hasher(s) and
8 * those with the best speed/secure tradeoff.
43 print 'Iterating ' . $count . ' times over all ' . count($hasher) . ' mhash hashers ...' . "\r\n";
45 foreach ($hasher as $hash) {
46 // Is this no number, the hasher is not available
48 $timers[str_replace('MHASH_', '', $hash)] = '- unavailable -';
52 $time = microtime(true);
53 for ($idx = 0; $idx <= $count; $idx++) {
54 $dummy = bin2hex(mhash($hash, 'mhash-test-abc-123-foo-bar'));
57 $timers[mhash_get_hash_name($hash)] = (microtime(true) - $time);
64 print 'Result from mhash() benchmark (in seconds per hasher):' . "\r\n";
65 print_r($timers) . "\n";