21.5.4 OutputThis is NOT the latest copy of this book; click here for the latest version.
In PHP 3, each line of code was read and executed as it was encountered, which meant that it really didn't have an output phase as such - the "output" was the code being executed. This was redone in PHP so that opcodes were generated as each line was read in, and iterated through as part of the execution. The second option is a great deal faster for execution, as you don't need to continually reparse, and recheck each line of code as it is encountered. However, it is a great deal harder to do, so we'll be looking to emulate the PHP 3 execution style: read a line in, and execute it immediately.
So, the output of our compiler will be an executed script. After every line has been read in, it will be executed immediately.
|
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.
My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!
|