Possible Duplicate:
Why is require_once so bad to use?
I’ve read somewhere that the include_once and require_once statements in PHP were slower than their non-once counterparts. Is this a significant slowdown? Has there been any testing or studies of this, and has it changed in recent versions of PHP?
The speed increase is minimal and comes as a reference check is conducted to prevent code duplication. The ‘once’ appendage is a preventative measure against the same code being executed/included twice..this performing this check comes at a minor speed cost.
If there is ever an instance where you are using
_oncelook into why it is the case, is you code really built in the most efficient way? It is often better to remove the need to rely on_onceand produce better code (easier said than done!).See:
http://forums.digitalpoint.com/showthread.php?t=1693837
http://www.phpbb.com/community/viewtopic.php?f=71&t=565933
http://www.sitepoint.com/forums/showthread.php?t=269085
http://www.quora.com/What-is-the-difference-between-functions-include-and-include_once-in-PHP