Re: spl_autoload vs __autoload
| From: | Marcus Boerger | Date: | Sun, 30 Dec 2007 17:58:30 +0000 |
| Subject: | Re: spl_autoload vs __autoload | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34303@lists.php.net to get a copy of this message | ||
Hello Andrew,
SPL simply allows two things:
a) a stack that hooks into __autoload
b) a default implementation that may be used (with ot without the former)
We try to group functionality into extensions where we seem fit. And by the
time I implemented spl_autoload stuff it made sense to put it into the SPL
extension. Just because that extension was meant to be the home for more
advanced OOP stuff.
marcus
Saturday, December 29, 2007, 2:28:53 AM, you wrote:
> Thanks for your replies guys.
> Part of the reason why I asked here is because of a previous posting a
> while back where Stas seemed to suggest that the spl_autoloader was
> superior but from reading the api i didn't know if this was purely
> from a flexibility point of view or if there was more too it. I
> probably should have been more specific in my question.
> kind regards
> Andrew
> On 12/29/07, Pierre <pierre.php@gmail.com> wrote:
>> On Dec 28, 2007 3:30 PM, <david.coallier@nyphp.com> wrote:
>> > On Dec 28, 2007 6:56 AM, Andrew Mason <slackmase2@gmail.com> wrote:
>> > > Hi guys,
>> > > Can anyone shed some light on the advantages of the spl_autoload over
>> > > the standard __autoload ? is there any ?
>> > >
>> >
>> > Please use php-general for that kind of question.
>>
>> This question makes sense here and brings yet again the question why
>> such things are not available by default.
>>
>> --
>> Pierre
>> http://blog.thepimp.net |
>> http://www.libgd.org
>>
Best regards,
Marcus