3v4l.org

run code in 300+ PHP versions simultaneously
<?php // use this to create the hash then delete it. //echo password_hash("thepassword", PASSWORD_DEFAULT); // paste hash here $passwordKey = '$2y$10$j33UPA7gNxSOBsXQcyquLOZRuO6X8k8hZOb1RA79iN8gLlqp9eIPO'; $userInputGood = "thepassword"; $userInputBad = "notthepassword"; if (password_verify($userInputGood, $passwordKey)) echo "correct "; else echo "incorrect"; if (password_verify($userInputBad, $passwordKey)) echo "correct "; else echo "incorrect";

preferences:
30.85 ms | 404 KiB | 5 Q