Re: Exceptions: Error Codes Vs Class Names
| From: | Alan Knowles | Date: | Sun, 29 Aug 2004 01:46:27 +0000 |
| Subject: | Re: Exceptions: Error Codes Vs Class Names | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33028@lists.php.net to get a copy of this message | ||
where as this just creates a single zval + refcounts the exception instance.. Slight snag is that it doesnt call the constructor (so the hooks in PEAR_Exception that call observors would not work..) Regards AlanThis should be faster: static $x = new My_Package_Exception throw $xWhy is this faster? doing "new XXXX", involves quite a bit of method calling / memory allocation..
- Davey