> You can write PHP with generics via docblocks
In other words: PHP almost has generics.
If you lock yourself to an editor that makes a MacBook Pro 2020 seem weak.
These were added to Java 5 in 2004. You don't have to use a specific editor.
> Outside of generics, what else are you missing right now in PHP's type system?
Besides generics on functions, generics on data structures, i.e. be able to define a data structure that specifically fits a parameterised type of thing into its fields.
Type inference -- you need strong typing before this is possible, and PHP's duct-tape typing isn't enough (yet).
Algebraic sum types. Rust proved that you can have these without going full functional.
Pattern matching. PHP is trying to get there [2], but C#'s "value types" [3] just have better semantics for getting there in a decade.
PHP doesn't just suck because it misses stuff.
The things that it does include are made strangely bad.
Traits (type classes) -- I don't mean "PHP traits", but traits as understood in Scala or Rust, or type classes in Haskell. They're more like interfaces. PHP traits are like C#'s extension methods. Reasons why those are not so good that also apply to PHP: It's not obvious where they're defined, extending 3rd party libraries breaks encapsulation, can't be mocked. PHP programmers will pure-heartedly explore their options and make worse code by applying PHP traits in any context other when you utmost have to. Which is pretty often.
> Is PHP fast enough?
No.
Performance is something you gradually realise you need.
Just because most people don't need PHP to be a performant language, does not make PHP a performant language. You're just lowering the bar. If you make real software with PHP, because, you know, it has really grown as a language, then you'll experience performance problems sooner rather than if you'd picked a compiled, optimizing language.
[1]: https://stackoverflow.com/questions/312184/disadvantages-of-...
[2]: https://wiki.php.net/rfc/pattern-matching
[3]: https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...