- password_hash: documentation ( source)
- crypt: documentation ( source)
<?php
$salt = 'OaZZhZgCp/VAldZFX2o6leedzq6wLT.';
$options = array('cost' => 10,'salt' => $salt);
echo password_hash('test123', PASSWORD_BCRYPT, $options)."\n";
echo crypt('test123', '$2a$10$' . $salt);