Hacker News new | ask | show | jobs
by muglug 1917 days ago
> You might be aware already, but the examples aren't the same

Yeah, because both TS and PHP have the same treatment of `!expr` I use the two interchangeably when demonstrating functionality, but the exactly comparable example is here:

https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMO...

> BTW, Psalm seems really cool! I've not used PHP in a long time, but I always felt it lacks tooling, so it's great to see people are making progress in that area.

Yeah, it's not the only open-source static analysis tool for PHP – there's also https://phpstan.org, which is even more popular