PHP

Caching #

OPCode (Operational code) #

  • An OPCode is the numeric identifier of a single operation that can be performed by the Zend Virtual Machine (Zend VM).
  • After PHP has scanned the human-readable source code and chunked it into tokens, these tokens are grouped together in the parsing phase
  • The little expressions are in turn compiled or translated into opcodes, which are instructions for the Zend VM to execute as a unit

=> Result of precompilation

OPCache #

Met le OPCode en cache

Bytecode #

  • Like l’OPCode, it tells the computer what to do
  • Difference: The bytecode is not executed directly by the processor but by a VM/Interpreter

JIT #

  • Just-in-time compilation is a method for improving the performance of interpreted programs
  • During execution the program may be compiled into native code to improve its performance. It is also known as dynamic compilation.

PHP cli vs PHP fpm #