Re: Return type hints
| From: | Brian Moon | Date: | Thu, 14 Sep 2006 14:43:09 +0000 |
| Subject: | Re: Return type hints | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-25683@lists.php.net to get a copy of this message | ||
Terje Slettebø wrote:
The above was a contrived example, meant to illustrate the point. What's so bad about it? That it doesn't check the return value?I am not worried about the return value of the method. I am concerned that $this->something is unset yet does not throw a notice. This is only true for properties of objects. Any other variable in PHP does not behave this way. IMHO, PHP should either initialize that variable to a default type and value or throw a notice when you try and use it without setting its value. -- Brian Moon ------------- http://dealnews.com/ Its good to be cheap =)