Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119120 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67761 invoked from network); 13 Dec 2022 14:14:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 14:14:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 70096180503 for ; Tue, 13 Dec 2022 06:14:04 -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=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 13 Dec 2022 06:14:03 -0800 (PST) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 3D30B10C025; Tue, 13 Dec 2022 14:14:03 +0000 (GMT) Date: Tue, 13 Dec 2022 14:14:03 +0000 (GMT) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Rowan Tommins cc: internals@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [PHP-DEV] Revisiting RFC: Engine Warnings -- Undefined array index From: derick@php.net (Derick Rethans) On Mon, 12 Dec 2022, Rowan Tommins wrote: > On 12 December 2022 22:20:27 GMT, Dan Liebner wrote: > >Here's my biggest criticism: the change essentially forces this: > >$arr['key'] > > > >to be rewritten as this (or some other intolerably bad alternative): > >isset($arr) && isset($arr['key']) && $arr['key'] > > > Fortunately, this is not the case, the actual replacement code is this: > > $arr['key'] ?? null Or before ?? was a thing, like: filter_input(INPUT_GET, 'key') cheers, Derick -- https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support Host of PHP Internals News: https://phpinternals.news mastodon: @derickr@phpc.social @xdebug@phpc.social twitter: @derickr and @xdebug