The introduction to me reads as very confused:

One of the most sought-after features for PHP is Generics: The ability to have a type that takes another type as a parameter. It's a feature found in most compiled languages by now, but implementing generics in an interpreted language like PHP, where all the type checking would have to be done at runtime, has always proven Really Really Hard(tm), Really Really Slow(tm), or both.

* The topic of the article is implementing generics at compile time, but this claims that PHP is not compiled.

* Type checking is orthogonal to compilation vs interpreter.

* Types are not checked at runtime. It is kinda the point of types that they are checked before code runs. Runtime checks are on values. You can reify types at runtime but this breaks a useful property of generics (parametricity) and it prevents the very useful feature of types without a runtime representation (often known as newtypes).

* If you want to use types in the colloquial "dynamic type" meaning as tags on values, and you also want to talk about generics (a feature that only makes sense for types-as-compile-time-properties) you need to be really careful in your terminology or confusion will abound!

Addition, as I missed the edit window.

I wish they would elaborate on what Really Really Hard(tm) means. From a high-level I believe everything they are concerned with has been researched as part of the work on contract by Robby Findler and collaborators. E.g. https://users.cs.northwestern.edu/~robby/pubs/papers/popl201...

PHP afair compiles the textual PHP into some intermediate which is then run. So there is a compilation stage.

It's a bit of semantics, sure, but there's a subtle difference. In something like Java, there's a very distinct complication phase, the compilation is successful (type checks pass) and the bytecode is shipped off, and someone else runs that bytecode later. In PHP, you ship the code itself and the compilation phase is essentially the same as runtime. There is no distinct phase where types are pre-checked and analyzed. In PHP, all the syntax and type checking happens during (a phase of) runtime.

That's my understanding as well, so I don't understand why the introduction is worded as it is.