Skip to content

Instantly share code, notes, and snippets.

@adelarcubs
Created March 9, 2017 21:07
Show Gist options
  • Save adelarcubs/ccbeac94be140ba91703f55e07352783 to your computer and use it in GitHub Desktop.
Save adelarcubs/ccbeac94be140ba91703f55e07352783 to your computer and use it in GitHub Desktop.
<?php
for($cost = 4; $cost <= 18; $cost++){
$start = microtime(true);
password_hash("test", PASSWORD_DEFAULT, ['cost' => $cost]);
$end = microtime(true);
echo 'Cost: ' . $cost . ' Time cost: ' . ($end - $start) . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment