1

This might be asked somewhere, but in total i couldn't read somewhere about the parsing/lexing/execution of PHP script, calling OS functions, loading linking libraries / modules, external files etc in brief.

Let me explain : I read about the execution flow of a php program. PHP compiler ( zend engine) takes program and do lexing or tokenizing, parsing the script and generate op codes. Then execution unit take each opcodes and execute . Now i have question .

  1. If the script has an external class or file, what happens during the parsing, does the code of external class is also parsed at same time with the original script ? Else what happens
  2. A program has to brought in to memory to execute. How this happens in PHP's case with this engine ?
  3. If we use extensions / libraries function, when does this is linked . I understand these all has to be executed from their op codes ?

I am not sure about existence of my questions, but eager to hear in detail . Please help !

0 Answers0