Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119115 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45746 invoked from network); 13 Dec 2022 10:16:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 10:16:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BC3E61804DF for ; Tue, 13 Dec 2022 02:16:38 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,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: AS8560 212.227.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 02:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1670926593; bh=bm4uluN2PZx+GpQk3+dZSv4+eKa27xZmb7Db2O0jm9U=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=cqwPmPjTgOmHfBxzoCkIn4tWiLxuDcNetaw0terE3ZWxcVNAByrQdFZ6lL/DyG0hI eQMKDhedOYBP/O0ygdloInsGL9gXp9ynEAZU1jXkPEh0mnazbeh3ySAsiJZls+3PO7 SUKyUyDq1e9Mwe2Mm3Nm7V8F9RcFm0f3V5sbBQFRZAxgXYIGv3GBDP1GdFxR7tJtcm gCWHFrbphU/nJAcih9k+9wdXX6jHHfJRk4nYmcuR2YkpU3LD6KuZ5VK2M2+0J/1zYs 6PWuG5XWzGr8V+jm6P84IGw7mYULdQvAA+MidOfuTaVTkIgzQWdV2Xh+lwcK3D4Ji3 XMntRla99qnhg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.120] ([24.134.51.41]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MIwzA-1pKvb11e2s-00KN6m for ; Tue, 13 Dec 2022 11:16:33 +0100 Message-ID: <156fca4c-dd75-af1d-ebb8-b9783b8f0b5a@gmx.net> Date: Tue, 13 Dec 2022 11:16:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: internals@lists.php.net References: <5fe0d8a9-d305-9c9d-ca36-1ca30de87b78@cubiclesoft.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:dDo0bfvlOUEATntn0Qx8GuSBZmuOvXZ0iGHi9wbn5wCIIIoAfS0 6pReAgHSFV20fztGJXITPAaNe1RUmnvCVWCqlzqGNN0j8zdvgYG7WIGRM6xDuMlJOfkl0WV iLEn2ie51fccJL0vW1BEgdrFT41VfFCTNEC942GmNETKKL07trocpeyFNRcp76gQtwZwMF0 f4wyoUKKzGiNgWQjbXCcA== UI-OutboundReport: notjunk:1;M01:P0:LAU5FrslWKQ=;ojmT10LQd3y8r/bVcGsfLfvl/Jv 4AgH/tEt1rFkakiCErFi8/9zxu9XYgA19j7u382nBHX5d6We1VDHhBm4cYwRLrX8JUQHTAV5E KkXtSxFchherxXYIW9McOIa93j5/F2xLB1/eI8Hs1myLIcfF3cAlbVUQ2pxI4fNs0pzxxGBWB iK7je1wg3qGxI+A1MRUvkRFs8LPvobPxn0+ic8sZli4CFu+I/tAipqFWx2aELl6OcdUpNOz2X RTqDtHzVODbW6QPqVqSI+m6UlJg3h7CKqutmpHbp90P8LAO8NnoPAuwFKOzCn+u4AAvwgSzoC +dkcstNwM7FZTJq2CVKoJ1Q0n6JWiiNh4/DMemm1P2vawmvoQZ6yXu+BE2Sr89VD04n95Gjjs XfXW91yMXbUyV6PtTUJ7PzBDboLE3FX07MDk4WqYsrNpoZW+Mp+2t4dmd682l5OuOBF5IPdoT hZ+VdAtw6OnbH5asGrBpYBWhqpoAIhodEBi57LBeQeL0GfpjqXKGAD+UOFZYy70HVUhGGIdTl zv9YyYukizH8cFEoOMAmXVHg5+5Z5CXmSKEmwgv3QsIwP7IApJhs1Kp10hz5/CKHnPDl7QNL7 4WRyEXcOJn2vRBQKwu7tSHL2nXS0ACgcxmuUqHY+jC/3t99oBEImgWQcoX1/Oi8dZM28bX3/9 G9dXyiT4YaUaMcXgw/T1Y9D4kpjfdL+6ZAcajNk1C0otREKW0Y8POZiRRx4YYRn/fal+JOjhW u8yGaNA/PpfBS6XLM8LnDCIPvYjvUMNV+ZE8a/Pbu4A1RJeMBdKQHsolQVw0cZJbvi8gmpnn3 LXCmeYk9ei0+GXYiNQvtrZiiT1uIJo+DMULUeABeGFitYydnvb9I96CqxaxSF9xOiNfqxsP3n 31XF4hwYwjsoDSzr0u/jEeBbwy9UTTOL9zysRUi0ZpSl0uioNN/B5AleUIXPzdlpJoA+cdfHM f73Y7A== Subject: Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index From: a.leathley@gmx.net (Andreas Leathley) On 13.12.22 11:01, Robert Landers wrote: > intended: ($a['foo'] ?? null) || ($a['bar'] ?? null) > Further, writing code like this increases the number of opcodes needed > to perform relatively simple logic by ~150%, increasing end-user > latency and spending CPU cycles somewhat needlessly. I think it is quite the opposite: calling the error handler because of E_NOTICE (or now E_WARNING) is quite the additional overhead, and if projects just ignore E_NOTICE their applications will be slowed down because of that, while fixing the code will avoid the error handler altogether. Just because something is longer to write in a programming language also does not make it necessarily slower. But if you have any actual measurements why using the null coalescing operator would slow down code in general that would be something useful to share.