Re: What's wrong the __autoload()?
| From: | Eric Butera | Date: | Wed, 12 Mar 2008 16:29:00 +0000 |
| Subject: | Re: What's wrong the __autoload()? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271399@lists.php.net to get a copy of this message | ||
On Wed, Mar 12, 2008 at 10:05 AM, Gustavo Narea <me@gustavonarea.net> wrote:
> Hello all,
>
> I'm wondering what's wrong with the use of __autoload(), since I see that
> projects like the Zend Framework don't use it and prefer to require_once
> each required file.
>
> Thanks in advance.
> --
> Gustavo Narea.
> http://gustavonarea.net/
>
> Get GNU/Linux! http://www.getgnulinux.org/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Use spl autoload register instead. This way your app and dependent
libraries can have their own autoloaders.
http://us2.php.net/manual/en/function.spl-autoload-register.php