- password_hash: documentation ( source)
- microtime: documentation ( source)
- round: documentation ( source)
- explode: documentation ( source)
<?php
function chrono()
{
$temps = explode(' ', microtime());
return $temps[0]+$temps[1];
}
$debut = chrono();
$options['cost'] = 10;
for($i=0;$i<1;$i++) {
$p = password_hash('toto', PASSWORD_BCRYPT, $options);
}
echo'<hr>';
echo round(chrono()-$debut,10);