According to the Zend website, PHP 4 is compiled before execution. This is different to an interpreted language (like PHP 3), which is executed as the file is being parsed.
PHP 4 works thus:
Browser makes a request to the web server. The web server makes a request to the PHP web server interface. The interface calls the Zend engine, which reads the code from the disc. Here comes the important part: The code is then passed to the run time compiler, which creates a compiled representation of the script. The compiled script is then passed to the Zend executor. The output from the executor is then passed to the web server interface, which passes the data back to the web server and from there to the browser.
It is all detailed at www.zend.com, do take a look when you have the time.