Matthew Weier O'Phinney-3 wrote:
>
>> Somewhat related and more a question for Matthew, but is the
>> *autoloader* supposed to use include_once?
>
> It's using include -- as it should be (look at line 83 of Zend_Loader,
> as reported above, if you don't believe me; it reads "include $file;").
>
> I'm not sure why it's being reported as "include_once".
>
> We use include() because the _once variant has more of a performance
> impact. Internally, we check first to see if the class_exists(), and
> only if it doesn't do we attempt to include() it. And yes, I've profiled
> and benchmarked both approaches. :)
>
The 1.7.6 Zend_Loader uses 'include_once' on line 83. :wistle:
> @version $Id: Loader.php 12507 2008-11-10 16:29:09Z matthew $
>
> 81: } else {
> 82: self::_securityCheck($file);
> 83: include_once $file;
> 84: }
>
--
View this message in context:
http://www.nabble.com/Issue%3A-Resource-autoloading-with-Zend_Loader_Autoloader_Resource-%28incubator%29-tp22232795p22235293.html
Sent from the Zend Framework mailing list archive at Nabble.com.