The password_hash() function in PHP is an inbuilt function , used to create a new password hash with different algorithms and options. the function uses a strong hashing algorithm.
the function take 2 mandetory parametres ($password and $algorithm,) and 1 optional parameter ($options).
$strongPassword = password_hash( $password, $algorithm, $options )
Algoristrong textthms allowed right now for password_hash() are :
PASSWORD_DEFAULT
PASSWORD_BCRYPT
ASSWORD_ARGON2I
PASSWORD_ARGON2ID
example : echo password_hash("abcDEF", PASSWORD_DEFAULT);
answer : $2y$10$KwKceUaG84WInAif5ehdZOkE4kHPWTLp0ZK5a5OU2EbtdwQ9YIcGy
answer :$2y$10$SNly5bFzB/R6OVbBMq1bj.yiOZdsk6Mwgqi4BLR2sqdCvMyv/AyL2
to use the BCRYPT as password, use option cost =12 in an array , also change 1st parameter $password to some strong password like "wgt167yuWBGY@#1987__"
Example: echo password_hash("wgt167yuWBGY@#1987__", PASSWORD_BCRYPT ,['cost' => 12]);
Answer : $2y$12$TjSggXiFSidD63E.QP8PJOds2texJfsk/82VaNU8XRZ/niZhzkJ6S