4 ms·
If PHP is compiled, then it still has almost the same benefits and drawbacks compared to all the other languages, except for one: once it's compiled, PHP runs f
by sketerpot 17y ago
If PHP is compiled, then it still has almost the same benefits and drawbacks compared to all the other languages, except for one: once it's compiled, PHP runs faster than it does when interpreted. Simple.
IIRC the compiler for PHP uses a scheme compiler as a backend.
- worldhello 17y agoSo then APC + PHP == (compiled python) == (compiled ruby) == C ? Sorry am not a python or ruby person so don't know how compiled code works out there.
- inerte 17y agoLet's say you write a Python program that outputs Javascript. It could be considered a "compiler". Or let's say that you write your own language, which outputs to other 3 or 4... there's also compiling involved. A compiler doesn't need to output assembler. Even if every compiler did that, features of the language would result in different execution code. For example, PHP's variables can be a string of any size, or a number, or an object, and you can change its type while the program is running. The compiler doesn't optimize the code execution as easy as, say, in Java. You can not allocated the minimum amount of memory that will store the variable values, for example.