Re: New exceptions mechanism
| From: | Stephane Drouard | Date: | Tue, 03 Feb 2004 16:22:14 +0000 |
| Subject: | Re: New exceptions mechanism | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7510@lists.php.net to get a copy of this message | ||
== Quote from Markus Fischer (mfischer@gjat.josefine.at)'s article
> At least, saying 'InstantiateMe->' looks wrong to me as I'm calling
> 'StaticClass::' actually.
You have to declare your method as static:
<?php
class StaticClass {
static function staticMethod() {
throw new Exception("example");
}
}
?>
Stephane