If I may chime in and ask, what -- if any -- problems could arise from
wrapping each require/require_once with a condition to see if __autoload()
is defined?

For example, in my bootstrap I do the following:

function __autoload($className) {
   Zend::loadClass($className);
}

And then in every file that I need to load a library, I do:

if (!function_exists('__autoload')) {
   require_once 'Zend/Path/To/Component.php';
}

Would this be a sufficient way to go between both situations? If I need to
disable autoloading, I don't have to worry about my code breaking, and if I
do use autoload then I'm not wasting a call to the require or include
functions.

--
It looked like something resembling white marble, which was
probably what it was: something resembling white marble.
               -- Douglas Adams, "The Hitchhikers Guide to the Galaxy"

Reply via email to