I am using the following PHP code to hash a user's password.
$options = [
'cost' => 10,
'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),
];
$hash = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options);
Is this method safe? Is the password getting salted?