Friday, 21 November 2003
require_once vs. include_once in PHP (webstuff)
I keep forgetting the exact answer to this one, so figured I’d note it:
[PHP] Re: include_once vs require_once
Basically, as I understand it, require() and require_once() are replaced during parsing—before code execution. And include() and include_once() are replaced during code execution. Thus, a required file is always imported into the file whereas an included file is only imported if the include() statement is executed.
erin posted this on 21 November 2003, 11:03 PM · updated 23 February 2005, 11:13 PM
