What pragmatic value does PHP provide?

There is a huge value in statically typed languages.

The value of static typing is hugely overstated by some people, it is just one small part of a language, that means little by itself.

Which is why for example some of the worst codebases I've ever had to refactor have been in Java, because whilst the static typing helps that, the vast trees of classes / objects, side effects, etc was the big problem in refactoring.

Or why for example it is easier to end up with deadlocks, race conditions, other side effects, etc in Go a statically typed language than it is in Erlang (or Elixir) a dynamically typed language. (hint: immutability and isolation is more important in this area)

Then you have that people tend to ignore that simply having static typing doesn't mean much, there is big difference between the capabilities of static typing in things like Haskell, Rust, etc compared to Go, Typescript, etc.

If people who bang on about static typing were genuinely concerned with a language that reduced errors, increased readability / understanding, etc then they would all be recommending a statically typed, functional language that was immutable (at least by default). But the vast majority don't, because the vast majority are really just overstating their preference for static typing or in many cases simply lack experience.

/r/PHP Thread Parent