Feedback for nullc Idea
| From: | Robert Chapin | Date: | Sun, 23 Mar 2025 12:52:11 +0000 |
| Subject: | Feedback for nullc Idea | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-126911@lists.php.net to get a copy of this message | ||
Hi PHP folks,
I submitted a proposal on Monday that received no replies. The idea was about adding a functional construct nullc() that could act as an inline null coalesce for a variable. That task is currently not possible in a nullc() user function, but instead requires an expression like ($var ?? null) with mandatory extra parentheses. A functional expression could make this less prone to mistakes. It would also avoid concerns with alternatives such as unary operators.
Any feedback on this idea would be appreciated.
-------------
Robert Chapin