Replies: 1 comment 6 replies
-
|
Can you actually make PHPStan return $hash = password_hash($input, PASSWORD_DEFAULT); |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
is this reporting correct?
PHP documentation site says
password_hashreturnsstringbut PHP docs in VSCode saysstring|false|null. And if I check for false and null, phpstan reports it.If I try in PHP with invalid algorithm (e.g.
password_hash("input", "non-existent algorithm"), it does returnnullbut also generates a warning. I have no idea in what conditions it could returnfalse.https://phpstan.org/r/1ab1e0c7-e641-4e54-9037-46af0e4f37fa
Br, Miika
Beta Was this translation helpful? Give feedback.
All reactions