Re: Tip for 5.3: exceptions in __toString and __autoload

From: Date: Sat, 27 Dec 2008 14:46:24 +0000
Subject: Re: Tip for 5.3: exceptions in __toString and __autoload
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-42386@lists.php.net to get a copy of this message
Hi, With __autoload you can throw an exception as long as you define the class requested. If you don't, the fatal error from the fact the class isn't there is triggered before the exception and you never see it. A clutch would be eval-ing an empty class with the same name right before you throw. I leave up to you how appropriate that is. Regards, Stan Vassilev

« previous php.internals (#42386) next »