parsing - How exactly is a PHP script executed? -


i thinking myself "how php script executed?" thought parsed first syntax errors etc, , interpreted , executed.

however, don't know why believe correct. i'm wrong.

so, how php file interpreted , executed? stages involve? how included files fit parsing of script?

this me head around it. i'm interested , can not find answer google.

basically, each time php script loaded, goes 2 steps :

  • the php source code parsed, , converted what's called opcodes
    • kind of equivalent of java's bytecode
    • if want see like, can use vld extension
  • then, opcode executed

these slides sebastian bergmann, on slideshare, might understand process bit better : php compiler internals


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -