This is the same idea with PHP:
- First step: PHP source code (i.e. some text) compiled into a set of opcodes
- Second step: these opcodes are executed.
This compilation, by default, is executed every time a PHP script is to be executed - which some processor accepts.
For this reason, you can use some operation cache code (for example, the APC extension ) to save operation codes in memory - avoiding the redundant compilation step.
You can find interesting information about these processes in the next presentation by Sebastian Bergman: PHP internal compilers
source share