For people not using Intellij (or wanting a tool that can be used as part of commit/deploy setup there is phan which is well executed).
I've mocked PHP for a long time (been using it for various day jobs for over a decade) but they've made massive strides in the last 2-3 years to the extent where used properly it's approach 'not a bad' language status.
* touching basically any standard library function negates a lot of the benefit
* silent coercion still happens everywhere inside a function body
Even if strict comparison, you have to spend a lot of code validating the input and it's really easy to forget an edge case.
1. Generic typehints, for one. Typehinting half the methods as returning a generic `array` is not fun.
2. And that's before you even remember that PHP's array is both a vector and a hashmap, so you need to install a PECL extension or a third-party library to get proper Map/Sequence/etc.
Yes, which would make it behave exactly like probably every language with strong runtime typechecks. Very weird indeed. It's obviously much more preferable that the code sometimes does the wrong thing without warning.
And of course with static typing, it would be extremely weird since the code wouldn't even pass the compiler!