Re: [RFC] Transform void into an alias for null
| From: | Tim Düsterhus | Date: | Tue, 03 Jun 2025 15:16:01 +0000 |
| Subject: | Re: [RFC] Transform void into an alias for null | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127559@lists.php.net to get a copy of this message | ||
Hi
Am 2025-06-03 01:46, schrieb Ilija Tovilo:
IMO, these checks are useful enough not to be removed.I agree with Ilija (and also Rowan). To me there is an important semantic difference between “not returning anything” and “always returning null”. I believe that
void being in a distinct type hierarchy is the right choice and when considering “untyped returns” to be soft-deprecated / discouraged, there are no inconsistencies either.
Best regards
Tim Düsterhus