A delicately modified port of the original PHPass hashing framework, made Composer-friendly.
composer install friartuck6000/phpass
use Phpass\PasswordHash;
$hasher = new PasswordHash(8, false);
// Generate a hash
$hash = $hasher->HashPassword('abc12345');
// Check a hash
if (!$hasher->CheckPassword('abc12345', $hash)) {
die('Incorrect password!');
}