Re: Allowing NULL for some internal functions
| From: | Pierre Joye | Date: | Thu, 02 Dec 2021 17:32:02 +0000 |
| Subject: | Re: Allowing NULL for some internal functions | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116561@lists.php.net to get a copy of this message | ||
On Thu, Dec 2, 2021, 10:20 PM Sara Golemon <pollita@php.net> wrote:
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?
>
> I would say that such applications should consider unifying their own
> types. $a = $_GET['q'] ?? ''; Is there a place in the application where
> empty string and null would have been distinct? i.e. Is a search for
> nothing different from not searching?
>
I wonder what is the technical benefit from that?
I do feel we are moving to a strict typed language. If that is what is
desired, then let decide it clearly and move forward to rhst direction.
best,
Pierre
>