[dev] Fwd: include vs include_once in Horde_Autoloader
Chuck Hagenbuch
chuck at horde.org
Tue Aug 4 20:08:12 UTC 2009
Quoting Michael M Slusarz <slusarz at horde.org>:
>> breaks things when calling any external code libraries like PEAR
>> that perform class_exist calls (actually any actions that would
>> trigger an Autoloader) in the case where the class it's searching
>> for is named the same as any of our files in the current
>> include_path.
Anything being the same? Or when our classes aren't properly
namespaced yet? If the latter, we should just fix our classes. If the
former, well that sucks.
> This might be a question to reserve for Chuck when he has a second.
> He was the one that told me that we should be using include here
> instead of include_once. I had changed it to include_once awhile
> back when we were first switching code over to Git.
>
> I'm not sure if his concern was due to the overhead of the
> include_once call or for some other reason. But I agree that with
> libraries that we can't control, it may be a necessary evil.
Yes, it was about the overhead of include_once vs. include.
-chuck
More information about the dev
mailing list