Reply to comment

Your reply

You need to sign up / log in to reply to this comment

Existing comment

From the php manual regarding "password_needs_rehash"

"password_needs_rehash — Checks if the given hash matches the given options"

Which means it is needed if the option parameter is changed. Option were not given by the user the manual says

"If omitted, a random salt will be created and the default cost will be used.

The question here is If I do not change the default cost, why would I need to use the password_needs_rehash?

Thanks for commenting

Please remember:
Be polite, helpful and keep a positive attitude
Keep it short
Use examples
Review spelling and grammar

Please avoid:
Long texts
Code that is untested
Wall of text