Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117146 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82267 invoked from network); 26 Feb 2022 21:44:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Feb 2022 21:44:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F1E318053A for ; Sat, 26 Feb 2022 15:05:10 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 26 Feb 2022 15:05:10 -0800 (PST) Received: by mail-qt1-f176.google.com with SMTP id t28so5864973qtc.7 for ; Sat, 26 Feb 2022 15:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UeuNiCEdmeFtOiAIb9HCaFHTDgqQZE+krQt3xDTo8/U=; b=XF5+7xTSAvz2DzkJXLVvN7YYhv5pA/EE8cyo2CdRzQ5wUzOYaAN2XZm6UsSBUVwaG1 2vc+TYU7ULvC1aGYo4zc70+v0IsQsebW8LSw1LpjVYdhh88pScnlrGCy02v+Py6U0D14 9oVbe4J5d4O5EoMnHtPsZwA+z/qXlRY/5jFHtacMOeobBp9pj93fl78GospWt5jxJ6IO jweGJUV8PY6rU16xtyVqtk9zJ+wIBX8UH1Jvp4D9vAxuibxEm6rHBw8mgpCC/9nRij50 JaCu58M0wDNER77qf9CJsLhzPIR0scaX7I8oqzau3kfDwBMMRwW0/RUk6yP4eWoP78Ar Vlfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UeuNiCEdmeFtOiAIb9HCaFHTDgqQZE+krQt3xDTo8/U=; b=0xD0SdmRjXuOyK1TwMzs2M6kjxs5af+/z8uEIDHQ3PhmcFzqL1jSoAm2BWeJycFSpP 63GMTCKS9SUpa1QL49bniGyLvLFx+vWt3yTik9GfWdOlHmSj8l1s9TbuUXLj5p3F0vl/ cFeeFBBlPt4GE18KtsLYjVkr/LZyrILIkOa85jDEv5FoXVLfyGmOORe0XziloQHf0v2D 7o178ovCWaW8zjqZfJBttrLK3EKREGZJWS53xZ2Kj0QQoyQBcWGavHuYtkb2Kh1T//3J MycSaJs6C6uU/jte7NyNjrM+pF1yZxt1DjBSdnRQEMedbnpOXomidRPyicYbefdk5AFT Xhgw== X-Gm-Message-State: AOAM533w2WYykl5VSJVg4dIQykrbOZ/oLrtKD8o3sTvqRpTOCmIkSbOp Xrg0UoehBKFuxbLBsxClyAIlOw2DR8/qpLHNZ24= X-Google-Smtp-Source: ABdhPJyAbf03SN2qCXtyqXKZiZrL2uG88rVAsoBMW2CFMVYU30AKXGZyZ70aQu/ENAqDbYkjjUc+CxmktWBHHGfnw8w= X-Received: by 2002:ac8:58d5:0:b0:2de:2dfc:77d3 with SMTP id u21-20020ac858d5000000b002de2dfc77d3mr11621357qta.168.1645916709409; Sat, 26 Feb 2022 15:05:09 -0800 (PST) MIME-Version: 1.0 References: <621a56dd.1c69fb81.67b1.242aSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: Date: Sat, 26 Feb 2022 23:04:58 +0000 Message-ID: To: Robert Landers Cc: Mark Randall , internals Content-Type: multipart/alternative; boundary="000000000000cb568a05d8f3d8e5" Subject: Re: [PHP-DEV] Re: Proposal for RFC to remove undefined array index warning when used ina ternary From: tekiela246@gmail.com (Kamil Tekiela) --000000000000cb568a05d8f3d8e5 Content-Type: text/plain; charset="UTF-8" I just wanted to add that the following $name = $_POST['name'] ?: 'Default Name'; with existence check would be $name = $_POST['name'] ?? null ?: 'Default Name'; You don't need empty(). I would be against changing the behaviour of elvis/ternary operator. However, I remember seeing past suggestions to implement another operator. One that would fill the gap between null-coalesce and elvis operators. If I recall correctly, most of the time, these proposals end in consensus that such operator isn't really needed. See https://externals.io/message/89292#89292 and https://externals.io/message/101606#101610 Maybe, it would be worthwhile to refresh a discussion about adding such operator to the PHP language? --000000000000cb568a05d8f3d8e5--