Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119114 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44157 invoked from network); 13 Dec 2022 10:11:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Dec 2022 10:11:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 25F611804DF for ; Tue, 13 Dec 2022 02:11:58 -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,HTML_MESSAGE,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-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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:11:57 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id h11so15040103wrw.13 for ; Tue, 13 Dec 2022 02:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=SAFcJdZyhzIJzUf1o2we6qERv5UKMAyGdwbhPr0gMP4=; b=ivzg0UCJ3byfpZD61FjH1uS1t5DOQ6cC1UoPOaGAG6SBfxzJS3M0Sytg6Kq2R1zaVa v9gsQPDmNa0HY/tj2apACYIZ4KwKdaG/67xDdF+z8U34Y4JIHh2nn0eICkXfVxNGYL7j pTyZKS5H6MfDXj9VCQe/aw9htD6GiaLjuPT24= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SAFcJdZyhzIJzUf1o2we6qERv5UKMAyGdwbhPr0gMP4=; b=W1aMUMkI8gtJrBjXo9q9FgkwLWYvliYwdUcqZ2HYdl1dm8toqHbzvP2/pAi9ZXxu5q juhnFiothEUO+kdvJG8B79hryyjgHzw7Ww/D9b6YzzvlbaVVd5I1lNS4yTLda9NUURyN K46AGlOO4seJNXQ94HCzzFawxFjPOVYMVGtmFfXiC41AkwNHmYue9kSd04jTdcnVQPzF HElFqo75Bqv9Wc2u8cV9myAUZepStpsN0AxqGhkxLgTvWgGpwhqRSOgETYX07OSgkvZq PdjUM+ccdvwXLkU87OuXUk/JdXLmnPCioGUmerlNIY7dC+hrFQQw+1kIdKS2Q3VgB3kz g+6g== X-Gm-Message-State: ANoB5pkM0FnE0irdtMSDbdIjg/eKdrVN8mYdnLIUl42oteGtQJLjk2VG oKAINaQifeaqlchD1Kc6h0IVMQ== X-Google-Smtp-Source: AA0mqf6LAqZKjD+hFuOAo9/aGQ/SQmeRDQX0XsMrK+f0MJtGxEDkUE3vAQyPjOu6uRNhw5waTB/eFQ== X-Received: by 2002:a05:6000:104a:b0:242:257f:56f8 with SMTP id c10-20020a056000104a00b00242257f56f8mr12211848wrx.11.1670926316215; Tue, 13 Dec 2022 02:11:56 -0800 (PST) Received: from smtpclient.apple ([92.234.79.97]) by smtp.gmail.com with ESMTPSA id h14-20020a5d430e000000b0024242111a27sm11125117wrq.75.2022.12.13.02.11.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Dec 2022 02:11:55 -0800 (PST) Message-ID: <38E9E8ED-F266-4EFC-8E17-DDD60F45EADA@craigfrancis.co.uk> Content-Type: multipart/alternative; boundary="Apple-Mail=_284ABF28-FE35-4C72-A43A-2300D1174BD0" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Tue, 13 Dec 2022 10:11:50 +0000 In-Reply-To: <5fe0d8a9-d305-9c9d-ca36-1ca30de87b78@cubiclesoft.com> Cc: PHP internals To: Thomas Hruska , dliebner@gmail.com References: <5fe0d8a9-d305-9c9d-ca36-1ca30de87b78@cubiclesoft.com> 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) --Apple-Mail=_284ABF28-FE35-4C72-A43A-2300D1174BD0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 12 Dec 2022, at 23:36, Thomas Hruska wrote: > I suspect many people are in a similar holding pattern who are = currently running packaged 7.4.x and are just now discovering all of the = changes for PHP 8.x as they are planning out their system upgrade paths = in the coming months. While you probably wish everyone marched in step = with PHP-latest, that's simply not feasible in reality. Hi Thomas, Dan, I know a few teams that have started using 8.x on their development = servers (while 7.x is still on demo/live). Each team has their = difficulties, but fortunately most issues can be ignored for now (as in, = code works, and gives you time to make changes)... undefined indexes are = a classic, but once you've found them all (the tricky bit), it often = makes your code better, and helps identify mistakes (similar to = undefined variables). But, the one change I still cannot justify, is the deprecation of null = being passed to the ~335 functions like htmlspecialchars. The null value = can come from many sources (e.g. GET/POST/COOKIE/databases), and while = you can still use null coercion in contexts like string concat (empty = string), arithmetic (the value 0), or a boolean (false); finding all the = function calls is incredibly hard (one team I work with, who has a = fairly good test coverage, is still finding these over a year later)... = at least it can be ignored for 8.x, but it's going to be a nightmare for = 9.0... I tried writing an RFC to revert this change (considering there = was pretty much no discussion went into it, and I cannot find a benefit = for breaking coercion in this one context), but it was met with a lot of = hostility from internals, so I'm finding ways to work around it, because = I don't like systems using old/unsupported software (and I've got some = ugly hacks for it, like using the latest version of Rector to flood your = code base with `(string) $var`, or to use a namespace). Craig https://wiki.php.net/rfc/null_coercion_consistency = https://externals.io/message/117501 = null_coercion.php index.php = --Apple-Mail=_284ABF28-FE35-4C72-A43A-2300D1174BD0--