RE: On large application organization [long and possibly boring]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Just out of curiosity, a lot of people had answers to this question, but
> I couldn't find a shred of evidence in the
> documentation.  Did you do similar tests, hear from gurus, or something
> of like?  Or did I just miss it somewhere?

Once upon a time, a long time ago, require and include were different.

In fact, they were different in exactly the way being discussed, only more
so.

'require' would be loaded *ONCE* when the script got there, and the values
within the file required would be whatever they were upon that first load.

'include' would be "re-loaded" each time it was reached.

This cause all manner of confusion, and somewhere around version 3 or 4,
was abandoned.

The only difference now is that require signals an ERROR and include only
a WARNING.

In either case, if your require/include is inside a conditional, it will
NOT be "seen" by PHP until that line of code is executed.

This is the way 'include' worked, and the way most people who were
confused in earlier versions though 'require' "should" have worked.  Now
it does.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux