On Thu, 2 Dec 2021 at 15:19, Sara Golemon <poll...@php.net> wrote:

> On Thu, Dec 2, 2021 at 8:48 AM Craig Francis <cr...@craigfrancis.co.uk>
> wrote:
>
>> Is there any value in me proposing an RFC to update *some* internal
>> functions so they can accept NULL?
>>
>
> I'm not hard against this idea.  The interpretation of null in these
> contexts as being equivalent to empty string isn't unreasonable.  I guess
> the only objection I could have would be an academic one and I can't really
> defend that.  So yeah, sure... why not?
>


Thanks Sara,

I've spent a few days coming up with a short(ish) list of parameters that
are likely to receive `NULL`.

The focus is on making it easier for developers to upgrade to newer
versions of PHP. I'm thinking of the typical developer, probably using
WordPress, isn't using Psalm (at levels 1 to 3, with no baseline), and
isn't using `strict_types`; where they don't really have the time to add
strval() to everything that could be NULL.

Draft RFC:
https://wiki.php.net/rfc/allow_null

And the list, where I'm proposing we only relax this requirement for the
*bold* parameters:
https://github.com/craigfrancis/php-allow-null-rfc/blob/main/functions-change.md

I'll give it a few weeks to see if there are any parameter suggestions
(welcome via email, pull request, carrier pigeon, etc), then I'll start
looking for the best way to implement this.

Craig


PS; starting new thread, as I have gone a bit off topic, original one at:
https://externals.io/message/116519#116556

Reply via email to