NYCPHP Meetup

NYPHP.org

[nycphp-talk] Include vs Include_once

John Campbell jcampbell1 at gmail.com
Fri Nov 30 00:13:14 EST 2007


> include_once is a real performance drag.  You should use better program
> logic to make it possible to use a regular include call.

That is news to me.  Why is include_once a performance drag?  What is
the better programming logic, that doesn't just duplicate the
behavior?

I have always just used include_once because it is more similar to the
import statement from other languages.  My assumption is that calling
include_once hundreds of times on the same file, is not as bad as
accidentally importing twice, but I don't have any data to back that
up.

Regards,
John Campbell



More information about the talk mailing list