- var_dump: documentation ( source)
- microtime: documentation ( source)
- mt_rand: documentation ( source)
- sha1: documentation ( source)
- hash: documentation ( source)
- header: documentation ( source)
<?php
header('Content-type: text/plain');
$b = hash('sha256', mt_rand(), true);
$s = microtime(true);
for ($i = 0; $i < 100000; $i++)
$r = hash('crc32', $b);
var_dump($r, microtime(true) - $s);
$s = microtime(true);
for ($i = 0; $i < 100000; $i++)
$r = hash('crc32b', $b);
var_dump($r, microtime(true) - $s);
$s = microtime(true);
for ($i = 0; $i < 100000; $i++)
$r = hash('sha1', $b);
var_dump($r, microtime(true) - $s);
$s = microtime(true);
for ($i = 0; $i < 100000; $i++)
$r = sha1($b);
var_dump($r, microtime(true) - $s);