by CiPHPerCoder · 9y ago · 0 comments
Use === instead; except for cryptography, where you want hash_equals().
> There's a lot of discipline/linting still required in PHP, whereas other languages won't even compile if you do something risky.
And/or just use scalar type declarations: https://3v4l.org/SJKe1
I've actually gone as far as rejecting commits that failed the linter and style checker, but that only works for code bases I have control over. It doesn't apply to the libs.
I now prefer languages where the entire ecosystem is passing strict compilation requirements.