1<?php
2/**
3 * For the VAST majority of use-cases, let password_hash generate the salt randomly for you.
4 */
5$password = 'idkWhatToUse';
6
7$hashedPassword= password_hash($password, PASSWORD_DEFAULT);
8?>
1$password = 'mypassword1';
2$passwordHash = password_hash($password, PASSWORD_DEFAULT);//hash the password
3
4echo password_verify('mypassword1', $passwordHash);//true, Yeah we match
5echo password_verify('wrongpassword', $passwordHash); //false ,Ooops wrong password