Re: [PHP-DEV] autoloading and undefined class constants

2009-07-06 Thread Alexey Zakhlestin
On Mon, Jul 6, 2009 at 6:49 AM, Ben Bidner wrote: > >   function autoloader($className) >   { >      throw new Exception("Fail"); >   } > >   spl_autoload_register("autoloader"); The whole point of spl_autoload_register() is to allow programmers to have several independent autoloaders. So, it is

Re: [PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Nathan Nobbe
On Sun, Jul 5, 2009 at 10:21 PM, Ben Bidner wrote: > > per the manual, exceptions thrown in an autoload method are swallowed, > > and an E_ERROR is triggered by php. > > > > http://us2.php.net/manual/en/language.oop5.autoload.php > > I have read that note before, and wondered exactly what it was

RE: [PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Ben Bidner
> per the manual, exceptions thrown in an autoload method are swallowed, > and an E_ERROR is triggered by php. > > http://us2.php.net/manual/en/language.oop5.autoload.php I have read that note before, and wondered exactly what it was referring to since you can throw exceptions within an autoloade

Re: [PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Nathan Nobbe
On Sun, Jul 5, 2009 at 8:49 PM, Ben Bidner wrote: > Hi folks, > > Just looking for a quick clarification on how class constant look ups are > performed internally under circumstances when an autoload function is also > called. > > > Consider the following example: > > > function autoloader($cl