Function instantiation
Posted: Tue Jan 26, 2010 3:48 pm
When does php perform the instantiation of a function:
So a single/few include files each containing many functions means less file I/O and include loading, but (depending upon when php instantiates functions) may carry a penalty of parsing and instantiating many functions, some not required,
vs.
Numerous includes each only containing a few functions which may result in requiring multiple includes and so heavier file I/O, but only parsing and instantiating those functions actually required.
Anyone a view on this?
- When the file containing the function is first loaded?
- When the function is first called?
So a single/few include files each containing many functions means less file I/O and include loading, but (depending upon when php instantiates functions) may carry a penalty of parsing and instantiating many functions, some not required,
vs.
Numerous includes each only containing a few functions which may result in requiring multiple includes and so heavier file I/O, but only parsing and instantiating those functions actually required.
Anyone a view on this?