Beyond the excellent explanation of how to do this, the section on the "Life of a PHP Script" is absolutely wonderful.
This is, quite frankly, beautiful.
Huge kudos to Nikita Popov for providing such a great illustration of how PHP works, internally, from the tokenization process, to the parsing, and finally the execution.
I have always been curious about the process and have read other documentation that provides some insight but none of it has come close to this.
Even if you aren't interested in PHP or providing features to PHP, you should give this a read to understand how programming languages like PHP work.
This is, quite frankly, beautiful.
Huge kudos to Nikita Popov for providing such a great illustration of how PHP works, internally, from the tokenization process, to the parsing, and finally the execution.
I have always been curious about the process and have read other documentation that provides some insight but none of it has come close to this.
Even if you aren't interested in PHP or providing features to PHP, you should give this a read to understand how programming languages like PHP work.