Re: PEAR-wide code quality issue (fix proposal for possible class redeclare errors)
| From: | Matthew Weier O'Phinney | Date: | Mon, 24 Jul 2006 22:13:25 +0000 |
| Subject: | Re: PEAR-wide code quality issue (fix proposal for possible class redeclare errors) | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43558@lists.php.net to get a copy of this message | ||
On 7/23/06, peter fiksman <pfiksman@gmx.net> wrote:
Hello, still one question more on this topic: why not throw an exception then, like: if (!class_exists(Class_Name)) { class Class_Name {Because PHP already does this by throwing a fatal error. Why reinvent the wheel? -- Matthew Weier O'Phinney mweierophinney@gmail.com http://weierophinney.net/matthew/// class def goes here} } else { throw new Exception ("fatal error caught, redefining classname ... in ".__FILE__); }