Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- require, require_once, etc.
January 28, 2008, 2:41 am
rate this thread
- C. (http://symcbean.blogspot.com/)
January 29, 2008, 1:14 pm
Re: require, require_once, etc.
You missed out __autoload()
There's not a lot of difference in performance - there is a lot of
difference in the functionality - which should determine which you
How you use include files in general all rather depends on the scale
of your application in terms of lines of code and traffic volumes.
IME it's not particularly CPU intensive but having a lot of includes
can use up more memory than if the code were inline - but splitting
code into multiple files makes it easier to only load the code you
need (saving memory and CPU) and (unless you are Google, this next one
is typically the decider) makes managing your code much easier.
IIRC there used to be a tool out there which would inline code
automatically - a sort of precompiler. But I suspect it won't handle
all the scenarios that would be resolved by an explicit include or