Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117037 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44351 invoked from network); 15 Feb 2022 11:29:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Feb 2022 11:29:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D80F218053B for ; Tue, 15 Feb 2022 04:46:51 -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.6 required=5.0 tests=BAYES_05,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE 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.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (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 ; Tue, 15 Feb 2022 04:46:50 -0800 (PST) Received: from [192.168.178.22] ([85.212.15.11]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MORN0-1neP7X2TWw-00PvxL for ; Tue, 15 Feb 2022 13:46:49 +0100 Message-ID: Date: Tue, 15 Feb 2022 13:46:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ZGdfmb02yDEW7AQaEs+rOOh94zKuwLjLnjW5RMfHAoK2i15T6Sn 9MMe1C8GRjw/9domzHs8qCleoiOwq4OdwYmxKJ3BFEUhhEixsdo+3Cw4o3FL4n5gHdm83M6 8VS9bCO7ZMReyCumTfUMPHwWZuy5KhGyMTwhcESMs/4DYQ3U5iwP/q3VlU1KPNYgWOTDOur HkTKwvv+a1Yjc4AaGVTGw== X-UI-Out-Filterresults: notjunk:1;V03:K0:wcCogMaYOXs=:Pu3FbNgFRqkduKlhrMtrzX D7yHCOrdlvkwMBzDlvM5VdMGLXPc0HZBlkv1DVHfS3WoFLc1nmi31gm24wwxUwNBOsHhsTyBW MPnXbx94YK5EsCgG3E4xMzZeyMvtEEZTudhPJJFABKrJcH8MqRdkdrRB0K3VfSY7hT58WNdJ4 n7JFLzkYUDw2jQqg+cRLJqRtQACW4IHwbCwDOmMcgkqAWXXUcOipyXpqJb95u838x+8OZHTcd Z446+ZxJneaGH1nxdi8h7+ujx8NkPpLrtK633uIK5fcbsEXIvNQiOLU9GdBYmI96Xrc9l9qUU aCNZ4/qM7jEe8jLh0LfNdhh+HcsOfu6OxQs44EBXDvahoPakiyvFSt0wesoHQzgP7LLe7J4gV Xaef6uZGcN6Lz21d73ORaLNoZ7khXqGgZJRtj4P4fthIlbtfQiCwoGaOvcUq0UEL4e7hZPW8l ORlr2bkunnvNcMbsA/Kbk22BJKb6z9X7QgyJoItnX3QfxKf1xpYMbZ41Oz7VndmSU7bFw04Ia pngpRlL5YAT5nBkEF5YXIxDdhAqs3NkwBd9finXfPuEOtUEU59hwxB8qruKbPLCC++ZYk2nuS T6USsd3Jq/REmMJVg+y1TimrONSbp4aCeEEXIjv6fG3AdJXkEaYDfu4y0JnpTY4HllElLRfM7 7pnW/mVKKvO9zG17lwmXC5CrKTplg7Wb0Paib8izARS3FoKLdg2ZttvAzFn6zsvRv6fQnX+jN 63QUzq/b40mnIF7D Subject: Re: [PHP-DEV] Setting to disable the "Undefined array index" warning From: thomas@nunninger.info (Thomas Nunninger) Hi Nicolas, as far as I understand, adding new ini settings is not the way to go as this would mean that your code behaves differently on different environments. Two suggestions: * Write your own error handler that ignores those errors. * Try some tool like Rector to rewrite your code. Best regards Thomas Am 15.02.22 um 13:31 schrieb Nicolas BADIA: > Hi, > > As it is explained in this ticket https://bugs.php.net/bug.php?id=81417 we use to check if a property exists by accessing it directly like we do in JavaScript. > > Personally, I subscribe to this coding style and we use it all over our codebase (more than 130 000 lines of PHP code). When it became a notice, we disabled them, but now that it is a warning, it is a lot more problematic for us… We can’t even use the last version of PHP Debug for VSCode. > > As I’m not ready to spend weeks upgrading our codebase because our coding style is not supported by the community, I’m looking at alternatives. > > The more obvious and simple for me would be to add a setting in php.ini to allow this. So I’d like to know if it is something you would support. > > If not, I guess I will have to fork PHP, but this will complicate a lot our deployment process and make our code not portable. As I believe we are not the same in this case, I hope you will support the addition of a setting… > > Thanks in advance for considering this. > > Best regards, > > Nicolas