Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117063 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69266 invoked from network); 18 Feb 2022 10:05:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Feb 2022 10:05:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 32074180542 for ; Fri, 18 Feb 2022 03:24:02 -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.3 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 ; Fri, 18 Feb 2022 03:24:01 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so5539620wmb.1 for ; Fri, 18 Feb 2022 03:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=4LxjFTxc+jUTWDWH85v2NtTZUHb5Xlpm8J0R5o8XvN4=; b=lP12mWv4fzw+QdcXIGfUczuQ+RoOjRmuWUwsLjwEkYpyCjhtmF5fp9Zp/t2heGBjAe EjHSFsSkxKMKQ+7JLg2bAu4vnk6At5uMF2cXwWJonQJR/UxCmkfEsvOt1DXe6GbrmG8d RvI/j/kChdjsVIGpG82FP+gk/BRca7zNc985XxPbRMAZOlH4wZjwn240Np0kfm93+7NQ cBL4XqGs6pGaw/7uEQ99s2BJGuh7aQK8Q0ypb4aroSJzFpzB24OUVdjI5uabeBLT/tdY minlnoYcdlVKp5GufH3+0XDxhyIhe1tI8sGT/Pbnv6dZOSUJr4ajgJPlfRD3cL1QgvWZ w1OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=4LxjFTxc+jUTWDWH85v2NtTZUHb5Xlpm8J0R5o8XvN4=; b=AexXgpQ379WSO9Vc6uDvuG62pcLZviUoCpnoMeR5qRA5W3Jv6TeGEIH5SGTctXFIiJ cgt8JRjsXPnzzBoupGZRKIxZBTCAIoZ4NxLXa8jYCGvjKoQ6lAYVjNdGAO2zRL6KeweH ccAOEcuOYF36M0PghX1JA9zLTl1FaagzWQHoRTTgJttQTSCG0VodT0HTjuo1vTMVzN7Z /DHk6ZU8xhRR/H9qkAs4dpdU/KWtRU45ssecj1w65Uab2YcaGd8B0rqYuevyyzCfoOA5 /MirrfEdlK05V8Be+Fzzo6qR+5ePm8nF0sd97zq2F6t39hLgQBR6rwnMtrA6+xWkH5pj 9/JQ== X-Gm-Message-State: AOAM533cBxTT9MHKx9nzll1vNHIV/O1x1D3gxgHPgxtvOu2+1ESFpDgB Yi0MM3mGNK4rbgPXoVrHOYoSfWTR+2guOg== X-Google-Smtp-Source: ABdhPJxhb7hBM1F7uw6rw5/+t/Hey/2xfjHChzlMkohFsIqF8GZJ8HKPBvdnE6ydR1J5SKR/7eakDg== X-Received: by 2002:a05:600c:35cd:b0:34d:4e6:2834 with SMTP id r13-20020a05600c35cd00b0034d04e62834mr6804699wmq.25.1645183440618; Fri, 18 Feb 2022 03:24:00 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id o20sm4659111wmq.21.2022.02.18.03.23.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Feb 2022 03:24:00 -0800 (PST) Message-ID: <5efecaef-a024-3c61-e12e-ffc342956718@gmail.com> Date: Fri, 18 Feb 2022 11:23:58 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-GB To: internals@lists.php.net References: <620eda0f.1c69fb81.d2cb1.0846SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <620eda0f.1c69fb81.d2cb1.0846SMTPIN_ADDED_MISSING@mx.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Undefined Variable Error Promotion From: rowan.collins@gmail.com (Rowan Tommins) On 17/02/2022 23:28, Mark Randall wrote: > I present: > > https://wiki.php.net/rfc/undefined_variable_error_promotion It would be good to have a "Scope" or "Unaffected Functionality" section here, because there are a number of closely related things which were also raised from Notice to Warning in 8.0: - undefined array keys - undefined object properties - array access on a non-array - property access on a non-object I think it is sensible to discuss those separately, but it would be good to make that clear. Similarly, it would be good to have more discussion of what "accessing" means, as the current examples are quite narrow, only showing direct use and the ++ operator. Other functionality potentially affected: - passing the variable to a function, presumably excluding by-reference parameters which don't currently warn - all the combined assignment operators - https://www.php.net/manual/en/language.operators.assignment.php - the array append operator ($a[] = 42;) does NOT currently give an undefined variable Warning - variable variables, e.g. "$b = 'a'; echo $$b;" - the compact() pseudo-function There's probably others that I've missed. Regards, -- Rowan Tommins [IMSoP]