Re: [RFC] Destructuring Coalesce
| From: | Tim Düsterhus | Date: | Thu, 03 Nov 2022 19:55:05 +0000 |
| Subject: | Re: [RFC] Destructuring Coalesce | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118955@lists.php.net to get a copy of this message | ||
Hi
On 10/16/22 23:11, Bob Weinand wrote:
I've written a small RFC about adding coalesce ability to list() destructuring. This should enhance the ability to easily, concisely and readably destructure arrays with default values. https://wiki.php.net/rfc/destructuring_coalesce <https://wiki.php.net/rfc/destructuring_coalesce>Unless I missed anything, all the examples in the RFC deal with *absent* array keys. Can you also add an example where the key is present, but the value is 'null' to make the behavior with regard to that explicit? Best regards Tim Düsterhus