Re: [RFC] Void Return Type (v0.2, reöp ening)
| From: | Andrea Faulds | Date: | Thu, 15 Oct 2015 19:33:04 +0000 |
| Subject: | Re: [RFC] Void Return Type (v0.2, reöp ening) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88832@lists.php.net to get a copy of this message | ||
Hi Rowan,
Rowan Collins wrote:
Andrea Faulds wrote on 15/10/2015 17:34:Why shouldn't it? For the scalar types, internal and userland functions behave almost the same. I'd like there the two to converge, not diverge. -- Andrea Faulds http://ajf.me/Hi Pedro, Pedro Cordeiro wrote:The way Pedro described it, it wouldn't apply to any existing functions because they wouldn't be declared void. Obviously, type hints for internal functions are a bit weird anyway, but there's no reason to assume that every function documented as void would suddenly be annotated in the Engine as such and start returning notices.I've been thinking about what PHP should do when accessing the return value of aWe could do this, but I do wonder if it might cause a lot of E_NOTICEs to pop up for existing code, assuming we applied this to built-in PHP functions. I'm not sure.voidfunction, and so far, I think the consistent thing should be to get NULL, while throwing an E_NOTICE.