Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119134 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97311 invoked from network); 13 Dec 2022 17:03:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 17:03:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AA223180559 for ; Tue, 13 Dec 2022 09:03:32 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 13 Dec 2022 09:03:32 -0800 (PST) Received: by mail-wr1-f52.google.com with SMTP id f18so16321372wrj.5 for ; Tue, 13 Dec 2022 09:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=F0p995FXZo7O1LScghn3ZMteZNvKKQV7mbIkuwJd4Y4=; b=Xp+EskSTMIgYnQFFwbqnYURDnMOVEAtRWrJH0qIwq930Qqe4VgQZ++3HGAXXQf+vG4 yWsbHXcFy7Ar7NFcyYEeGAqTUkyvMKe/90N7P04byQ4Pik0gB5ZLKFklMmxqdvQDEbX8 HelmU2lHohzytgFb+DTqH7KpcRDrUh67xxNTc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F0p995FXZo7O1LScghn3ZMteZNvKKQV7mbIkuwJd4Y4=; b=2wOea9R8sC9hkAYwi4QyNOvIfFyjpLmN1MpX9lOlRY6xrwnLBG6azcnAFhwKFrAQp9 Tfc3Pd3sNZLQn4tdvFMep8tf1vb3Riz9k8Ac19FKvV8JHBVWD0LJZ+AvnHI0sx2LuhhH gOx83KcyR7DRCMbvrd5q9ehvtWMCCP5PwFbbmDNFWy6vrKkiaxDpNmQcDzYl6GSA4K+/ /hoBsu8GafOhkRM6N4K++OrjOHqFd7u0dalNYwa16GedT0H03gccdL7VE7iyHs7ZUgam jeypDWBUqTcP2ORgCo2ErbnxAhQAdosptK/gwu6aDZ1zRbp5dImZ8AjLk297smgqcDwv B/Vw== X-Gm-Message-State: ANoB5pmVRF6H61k6sWu9EPlY834uaumyPQRJyaQhwJJy/kQZpXTtHLA0 We1XAQCW+Rnei5DfaRxYKjGBGA== X-Google-Smtp-Source: AA0mqf4CNblMvaIQ2dsxbjPPZVDtqb9s4+Z0uK1GoJf+Po/KZXXmcW9/5B4XGCRlnTNgQ2Iq/PMDpw== X-Received: by 2002:a05:6000:1b08:b0:242:3d8d:1f16 with SMTP id f8-20020a0560001b0800b002423d8d1f16mr12806757wrz.67.1670951011233; Tue, 13 Dec 2022 09:03:31 -0800 (PST) Received: from smtpclient.apple ([92.234.79.97]) by smtp.gmail.com with ESMTPSA id bp7-20020a5d5a87000000b00241bd7a7165sm274816wrb.82.2022.12.13.09.03.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2022 09:03:30 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) In-Reply-To: <15577519-25ca-f802-b0b3-1a8b01a3bd36@gmail.com> Date: Tue, 13 Dec 2022 17:03:27 +0000 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <67ED8CF8-9318-4A37-A2EF-266ADFBE7AF3@craigfrancis.co.uk> References: <5fe0d8a9-d305-9c9d-ca36-1ca30de87b78@cubiclesoft.com> <38E9E8ED-F266-4EFC-8E17-DDD60F45EADA@craigfrancis.co.uk> <198FF5D4-9191-4C8C-9E5C-31DF2039A7FF@craigfrancis.co.uk> <15577519-25ca-f802-b0b3-1a8b01a3bd36@gmail.com> To: Rowan Tommins X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index From: craig@craigfrancis.co.uk (Craig Francis) On 13 Dec 2022, at 15:45, Rowan Tommins wrote: > Although presumably they return null rather than an empty string = precisely so that users can check if the value was provided, without = providing an extra method equivalent to isset($_GET['q']), e.g. >=20 > [...] >=20 > For cases where you don't need that distinction, Laravel, Symfony, and = CakePHP all allow a default to be passed as the second parameter. Yep, that's right... but it's not easy to know if that distinction is = needed for every single variable (why it's easier to work around this = issue at the sinks, as Rector now does). I assume the next step is for PHP is to deprecate null coercion for all = contests; e.g. concat ('Search: ' . $search), comparisons ('' !=3D = null), arithmetic, and the remaining functions like = print()/echo()/sprintf('%s')... and then deprecate all other forms of = coercion (e.g. 5 + '3')... because that will be fun :-) Craig