> > PHP on the other hand seems to load in ALL the code that
> MAY be run.
> > i.e. an include brings things in which are inside an if,
> even if the
> > if equates to false.
> A quick check in the manual, it states that:
> "Unlike include(), require() will always read in the target
> file, even if the line it's on never executes. If you want to
> conditionally include a file, use include(). The conditional
> statement won't affect the require(). However, if the line on
> which the require() occurs is not executed, neither will any
> of the code in the target file be executed. "
> So to do what you said i.e. conditionally load the
> function/files that you want then you should use include().
> So I don't buy this agument.
This is outdated. Look int othe archives - I had this discussion with
Zeev close to a year ago - since PHP 4.0.(something) require and include
behaves in the exactly same way.
Test it yourself on the latest release of PHP:
Access it with:
And then try it with:
What do you buy now?
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]