Re: [RFC] Nullable and non-nullable cast operators
| From: | Aleksander Machniak | Date: | Sat, 25 Oct 2025 07:40:30 +0000 |
| Subject: | Re: [RFC] Nullable and non-nullable cast operators | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128959@lists.php.net to get a copy of this message | ||
On 24.10.2025 09:07, Alexandre Daubois wrote:
Please find the details here: https://wiki.php.net/rfc/nullable-not-nullable-cast-operator I see two issues here, and I'm not sure how I feel about them.1. The new operators not only change how NULL is handled, but also add validation rules. So, their name should be changed, maybe "nullable validating cast". I guess "strict" word would not work as they aren't really strict. 2. They are supposed to have behavior in line with function arguments, but they don't react to strict_types. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com