PHP Password Hashing

/**
* PHP Password
*
* author homepage: blog.ircmaxell.com
*
* Document: http://php.net/manual/zh/book.password.php
*/

/**
* generate
*/
$mypass = password_hash('mypassword', PASSWORD_DEFAULT, ['cost' => 12]);

/**
* validate.
*/
var_dump(password_verify('mypassword', $mypass));