Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118955 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 85345 invoked from network); 3 Nov 2022 19:55:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Nov 2022 19:55:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8E3DF180044 for ; Thu, 3 Nov 2022 12:55:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 3 Nov 2022 12:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1667505306; bh=YqKoQ+aScFdeNRFn7i7XVtKvF+AfLW56pEMayIfa1HM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=PnMANQpQ10fjUv/vXqo4zG4kCQB6hwV3ZOjU3o+ZpnnuywdZnI1yo3GUnUfwNu/UJ qH+LbwTRnxpeo9BT+VbSVB3daEBq8dgFvmJtVqldm2BAvKQtmkVSnS2bUcDTahY2YY ieONJPDEKL9xc8nQ+R+lTJ1F2LUiGu49ToKLWfx4sJOIY48cE4Wo1Bb5fjOzqAA385 DzcFn8odWP9jimecx0pkIEUYXtMkcP6EvJybIj9eTJqxj76O+aCoMC/nY8I+PmvXUK 4gtK0WBds2pR3iUIS74r7QJIOypsFhZg7p6U5KJ+34kpcHczHC22xnHkTo1yfaTJK+ iO1KryDizX96w== Message-ID: <8ee5455f-5497-68e1-6774-7026df00949d@bastelstu.be> Date: Thu, 3 Nov 2022 20:55:05 +0100 MIME-Version: 1.0 Content-Language: en-US To: Bob Weinand , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Destructuring Coalesce From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) 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 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