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

2009-07-06 Thread Nathan Nobbe
On Sun, Jul 5, 2009 at 10:21 PM, Ben Bidner b...@vuetec.com 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

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

2009-07-06 Thread Alexey Zakhlestin
On Mon, Jul 6, 2009 at 6:49 AM, Ben Bidnerb...@vuetec.com wrote: ?php   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.

[PHP-DEV] autoloading and undefined class constants

2009-07-05 Thread Ben Bidner
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: ?php function autoloader($className) { throw new Exception(Fail); }

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 b...@vuetec.com 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: ?php function

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 autoloader