This is a rather outdated view. PHPs type system isn't the most expressive thing out there, but it's very achievable to have end-to-end type safety these days. For a start it's possible to delineate between nullable and non-nullable types, something many more "serious" languages don't support.
It has the weakness that, not being compiled, you need an additional static analysis tool to catch these things before runtime. But at least it has the good graces to crash if you tell it you're expecting a Foo and you try to pass a Bar, unlike e.g. Python.
Modern PHP is a completely different thing to the 5.x days. Yeah you still have the inconsistent stdlib, but everything has a few warts after 30 years.