Actually, an autoload handler should never emit errors or throw
exceptions. With handlers registered through SPL, it is already the
case. When using an __autoload() functions, raising an error when a
symbol is not found is useless because we know that the PHP
interpreter will do it. So, I propose to have PHP ignore any error or

This is a good point - raising errors in chained autoloader makes little sense since next one in chain might be able to load the class. However, I am still concerned about the performance impact - exhausting all autoloading opportunities might be not cheap in big application, and it would be not nice if people just using something like $foo = new DateTime() would lose a lot of performance on it. I strive for "if you don't use it, you don't pay for it" approach - i.e. if you don't have own DateTime class, you shouldn't have to pay for the possibility of having one.

interface. So, an autoload handler like PHK's has to try both. It is

What do you mean by "try both"? Could you explain a bit more on that?
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to