Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116762 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20516 invoked from network); 2 Jan 2022 13:16:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jan 2022 13:16:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D5A7E1804F8 for ; Sun, 2 Jan 2022 06:22:50 -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.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 ; Sun, 2 Jan 2022 06:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641133365; bh=RMmvMzwvz+Y4VAvqf8FLvScHqsMBOYvO1M+vFmR6d3M=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=PSVNKcCtxTMh9q+gDS5Auk2z0aovXgBUdX/y3/+cOkDppT52vahzXUZv/TYsXRXfy wq+ahnnrQrZn/1GIf26iodMB4HZBNN/2523LLBWfYYma38hqhXQg7MjkKOmsaGMHOw 6/CTwVybMRQwRax8QwyFrmJfz9jAekHmTzDDX4To= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.50.96] ([91.138.42.26]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpUYu-1mcLQv2zaW-00pxRi for ; Sun, 02 Jan 2022 15:22:45 +0100 To: internals@lists.php.net References: Message-ID: <64e5155a-2ee8-5ae0-5ee4-248712741911@gmx.net> Date: Sun, 2 Jan 2022 15:22:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Provags-ID: V03:K1:LPjXYjI07ad67uq2CKZN6Qlfy233gjD5/QBzpnt7gpVA4bRtyby Gh7oh9uWkR+nSfkQHSS06Ez/9lszw/IdefCpIUnHNTuscOEJ02Y6go6sdSUDr1aKl0Dx8iy 7iWm+1RSE6Sm6hqVyTEYgKS6MsWlAVx+GuiT2NVP/66cwuuJZjWLl6uyL5sxLO4VQyWwOIy 9dbZvVin7DRAF6Bf4XD3Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:n/toI074KuA=:9kyYatDHbtpBK+AmA/8IEm PjtOwH1HxFjQKEYUcVSWTzYSrEWBvXY3GlyVoztivp0LnwkO5GvCGuLmeuuGucFcNHJkjQSSp 0hrSL4iB04ybHxPvLhuTWy+M96VmvVsN05dnx4SxX/mSzeqY2+Bbfikla0XLs9vg4ojMr+6fJ vvLRfEXHmwqBQPZ4c1uGDkC2kc9+aeqG1ZTbuAdbMJqwcYoohTgJosrnZFAwt+tP2WqQ23sW3 qJZWQ3C6zv65n0MYXmgjGBICgoV5Lb4OnJPomPV9rijgHXb/umO3UPnV1lK6aSpGwdgZOWh6Y Lfd0Zzf1Fl0TfDYF1dg9Bi35wku+t+d1fIlI4G4XnSZYwngRG/raxECiX9qHdCg2q67qEtslr Z7R2v11+8sBxMbRctqXOw4BRWUwx4SvHLFir5dXzQpONozA6/eNzxtxZyWugZjk8lSKHZv/Fs iiyQ/0djGbNiLzWqFV/5lPJUXLZAkkTu7arZFJTuhrELa1DBAJJyIIloQdfsl4g+2JJoNjLYd bXvo6REt3B10D+GoYLXUng5gCzjzSnyTEQsOnPEy1rvomQOFWb5ol5HftF6zSKAfrP46zchFG AsOK9PzSGZMvfLCgaaAaBJyeEjInGFFPqPdfZcg9L97qZu9bBTMq4ZXAQHvPQXbFPFwhtwYHs eRleqnNW9RB5C8CKu4I02hYscGJ8pw50SCXKaROHyG71iktYx0CaRT1BjPeclSOgavj4XHfv1 Co+KkF8oArj981ZJ43/3fpD4MFMmzXj4vyaaEaZ4PEsZoPstNhMJc1T0NaNeKEw1HCrTxCQgr YsgsSfzqW3wxRStCWOfm3dyLKylEZBJaE9pNDYQIcbf6L5OFd1+pHDULOugaiufjT5uZgkyM9 BXDFnyCzhioP1NLLeaPBzyB/KaP9+Sc54wv3/5urwkEYd+bOfoU7seZgd2SVukBgDc166pdzb qKdoOMw7Pj9Gr7J1q5KLVfIZ3GDIRms0qFn0Ymf5ETay7wDeZeqSmA6tOj6n++aZ8vgF01ITb ec1M/HbqB543SfykurOjMLk9AFslj5htdjPjSC6lm5RTboQveFtvZil/nHukqe8pPQIZSLvgm Dn3oFL1wlXhZws= Subject: Re: [PHP-DEV] Allowing NULL for some internal functions From: a.leathley@gmx.net (Andreas Leathley) On 02.01.22 00:17, Craig Francis wrote: > I've spent a few days coming up with a short(ish) list of parameters tha= t > are likely to receive `NULL`. > > The focus is on making it easier for developers to upgrade to newer > versions of PHP. I'm thinking of the typical developer, probably using > WordPress, isn't using Psalm (at levels 1 to 3, with no baseline), and > isn't using `strict_types`; where they don't really have the time to add > strval() to everything that could be NULL. I don't think the current deprecation notices are a real hindrance in upgrading to a newer PHP version - there have been many such changes which require possibly many small adaptions in code in the past, like making undefined array keys a warning in PHP 8.0 (which seems a lot more radical than adding the current deprecation notices). Singling out this specific deprecation/change as impactful seems a bit overblown. I also feel like such an un-deprecation would be premature. PHP 8.1 has only just come out, the road until PHP 9.0 is still quite long, and deprecation notices can easily be ignored for now, for those who do not want to change their code right away. If in a year or two this is a big problem in real code, then there would at least be a basis for changing it, but I suspect most codebases will see more benefit in handling their types more properly than if the language "sometimes" automatically converts null to an empty string without complaining about it. I did have some occurances of this deprecation notice in my applications when upgrading to 8.1, and each time it was clearly a bug or oversight. Removing the deprecation notices would also remove those insights into possibly unreliable code.