Most of my programming experiance has been with compiled languages. However, I am now working in PHP.
In a compiled languages (or even a client-side scripting language), include directive only effect the preformance at compile-time. It has always been my style to make all global variables, functions, and data structures available to all source files by including a header file that would then in turn include all the project's headers in the correct sequence.
Now, as I have said, I am working in PHP. The design of my page is that of a program, with the <body> block treated as the main execution loop. Session data is used to carry volitile data from loop to loop. Global variables and definitions are used to hold static data, and a database is used to store data that should persist from sessoin to session.
Now, here's my consern: I am using include directive at the top of the main page to include all of my global variables and functions so that the page will have access to them all. But now I am beginning to wounder if that is such a good idea with a server-side script, from a preformance point of veiw.
My question: Does anyone know if PHP scripts are held in memory from execution to execution, or if all the files are read from disk with each invokation? If the latter is so, I could see a definite need to include variables and functions on-demand, rather than en-mass.
Any comments or suggestions would be welcome.
QBRADQ

