Could PHP become a compiled language?
PHP is doing most of the type checking at runtime like a compiled language would do. Well some checks are done in compilation but we don’t have that.
So I was thinking of what Java does, compile to some byte-code and use that optimised code to execute. We already have the JIT, maybe we could do some ahead of time compilation of some parts of code base if not all.
That would open so much potential like for generics and the type system in general, without loosing performance.
I know is something very difficult, like, how the old template nature of php would even work?
Still I just want to know what are the community thoughts about this. I would rather go in this direction than do something like typescript.