PHP provides an easy way to create secure password hashes and match them against plain text passwords. In fact, you can create a password hash with the password_hash() function, and match an existing hash against a plain text password with password_verify(). password_hash() takes care of using a strong enough hashing algorithm and adding a pseudo-random salt to the hash.