faqts : Computers : Programming : Languages : PHP : General Information : About PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

118 of 135 people (87%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Does PHP compile or interpret code?
Does PHP allow for the caching of compiled code?
How many times does PHP read a file from disk when interpreting it?

Jun 28th, 1999 01:57
Nathan Wallace, Zeev Suraski


PHP 3.0 interprets code.  PHP 4.0 compiles & executes code.

PHP 4.0 will also allow for the caching of compiled code.

PHP does not allow for the caching of code between requests.  For each
request, PHP only reads the file once from the disk in order to execute
it.  If it needs to reinterpret a part of it, it will not access the
file again, but rather, an in-memory representation of that file.