-- awkaiser <[email protected]> wrote (on Thursday, 26 February 2009, 03:24 PM -0800): > > > 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: }
Aha, sorry -- I was looking on trunk, which uses just a straight include. So that behavior will change with 1.8. -- Matthew Weier O'Phinney Software Architect | [email protected] Zend Framework | http://framework.zend.com/
