Re:PHP bug: Password_verify() always return true with some hash
by smt88 on Thursday February 23, 2023 @09:43AM
(#34911184)
Yeah, I mean it's still a dynamic language with the pitfalls that come with it (many shared with JS and Python).
Do I think dynamic languages are terrible and hate all three of the above? Yes.
Do I think modern, idiomatic PHP still suffers from most of TFA's examples of bad design? No.
Re:PHP bug: Password_verify() always return true with some hash
by rafark on Tuesday March 07, 2023 @04:27PM
(#35061502)
This is expected behavior and works like a charm. The type of a variable can always change at any time. The argument hint is designed to make sure you’re given the expected type. Not that the variable will only hold that type.
Something I found the other day, typed parameters won't error if you change the type, even with strict_types turned on: