This question has to do with the internal mechanics of the PHP engine. I'm asking it in an effort to understand the file include process.
Say, you got a 20,000 lines include file ( something like "functions_library.php" ) that gets included on all your php scripts.
Does PHP check/verify if that include file is syntactically correct every single time one of your php scripts load that file? Does this process happen at each page load over and over and over again?
Or...
Does PHP pay attention to the file's last modification date? If it turns out that there were no changes to it since the last check, does it simply ignore the checking?
On a default installation, the file will be parsed every single time. However, any production installation of PHP is recommended to have a bytecode cache, such as APC or many others. When bytecode cache is used, the script is parsed the first time and the interpreted code will be stored in memory.
Different configurations may alter how often file modifications are checked. Under some configurations, for very high performance, manual flushing or restarting the web server may be required.