logoalt Hacker News

oaieylast Monday at 8:25 AM2 repliesview on HN

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


Replies

jlbookerlast Monday at 5:29 PM

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.

noelwelshlast Monday at 8:54 AM

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