Re: Allowing NULL for some internal functions
| From: | Craig Francis | Date: | Sun, 20 Feb 2022 20:38:17 +0000 |
| Subject: | Re: Allowing NULL for some internal functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117080@lists.php.net to get a copy of this message | ||
On Sat, 1 Jan 2022 at 23:17, Craig Francis <craig@craigfrancis.co.uk> wrote:
> Draft RFC:
> https://wiki.php.net/rfc/allow_null
>
I've been over-complicating this... why should NULL be treated so
differently?
<?php
$values = ['a', 1, 2.3, false, NULL];
foreach ($values as $value) {
echo urlencode($value);
}
?>
It just struck me, this whole thing is about type coercion when not using
strict_types=1; and the 8.1 change has introduced an inconstancy by
deprecating the coercion of NULL, a frequently used value.
Craig