Script Garage

 

Why were PHP scripts/files need not be compiled if saved changes were made to it?

Public Comments

  1. Because those are scripts. There is separate PHP engine on server which interprets the code and executes them. So scripts do not have to be compiled. That is why you can run same script on different servers no matter what its operating systems are.
  2. Because PHP scripts are never compiled in the traditional sense of the word. By default, a script is interpreted every time it is requested. If you have an opcode cache installed, the script is compiled into bytecode on first access and at each consequent access, the bytecode is translated into executable code. Opcode caches are smart enough to know when the script has been updated, so the first time a script is requested after being updated, it will be compiled into bytecode.
Powered by Yahoo! Answers