-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Unless the opcache is smart enough to optimize the if block you are
never going to get the full benefit of the opcode cache as you are
conditionally including files.

Ken Stanley wrote:
> 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"

- --

Regards,

    William Bailey.
    Pro-Net Internet Services Ltd.
    http://www.pro-net.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)

iD8DBQFFpSVczSfrYDJMXmERA/l3AKCc58SpoFQimfKJEypSLt+5waRHGwCdFmYb
J4ecumrWR1PqS2tryrlHvy8=
=2T7E
-----END PGP SIGNATURE-----

Reply via email to