|| A note to the unknown coder
||Jan. 8th, 2004 04:23 pm|
include(); is *not* a suitable substitute for a function call.
One thing I'm not entirely clear on - I've tried to split out large sections of funtions into separate include files since they're generally needed in some pages and not others and it makes the codebase a hell of a lot easier to manage. But does PHP (mod_php4) cache included files across page fetches? It ought to be able to, but... (Well, the database hits are probably far more expensive than a few file read/parse cycles, but it'd be nice to know it's not gratuitously inefficient.)
There are worse problems with include()/require() than people using them too much. The default of url_fopen_wrappers on is pretty stupid, and in conjunction with people (stupidly) turning on register_globals or using old versions of PHP where it was the default has led to several compromises.