Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107071 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73567 invoked from network); 13 Sep 2019 12:04:30 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 13 Sep 2019 12:04:30 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 572082C143C for ; Fri, 13 Sep 2019 02:40:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS57367 213.189.55.0/24 X-Spam-Virus: No Received: from cache4.mydevil.net (cache4.mydevil.net [213.189.55.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Fri, 13 Sep 2019 02:40:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=korulczyk.pl; s=devil; h=Content-Transfer-Encoding:Content-Type:In-Reply-To :MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=w9JeR6M5JZyh7/16SI0VXvWquDcgZvzQkhuYB2hK/cA=; b=TPgGAkAiUFnhKVsEyQYDA9R3Pa e7RLJOqt9RWQ2WFBtxgQPMYNjYjUyMGgGb7fyztkUz1rDKN64TJdenyoJdjSQF3LeztgPz1GQNLsM WAFEKCMx5Ie1TRnQiOUpqMVM9IIm+XirQT9aMwnLb1OgKg8tVxwQb0bFimrAVBT3pOUU=; To: internals@lists.php.net References: <3c843963-176d-85c8-bf89-cc944640a7fb@korulczyk.pl> <0b4e8de1-5d3d-9646-49d0-6a2db41820d9@gmail.com> <4565840b-f732-99b0-de81-c386c433017c@korulczyk.pl> <99a346b7-b909-6ffc-a242-e865613430a5@gmail.com> Message-ID: <1f9b493c-af34-5619-dbce-8edb51ca0c2f@korulczyk.pl> Date: Fri, 13 Sep 2019 11:40:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <99a346b7-b909-6ffc-a242-e865613430a5@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AV-Check: Passed X-System-Sender: robert@korulczyk.pl X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: robert@korulczyk.pl (Robert Korulczyk) > $foo[$key1] has to be read to determine if it's already an array, and if it has the key $key2, in the same way that in $foo[$key1]++, $foo[$key1] has > to be read to determine if it's already an integer and what it's value is. $foo[$key1] needs to be read only to obtain previous value, type is irrelevant (obviously you will get error if types does not allow for such operation, but it has nothing to do with accessing uninitialized variables/keys). You can't increment $foo[$key1] without knowing current value of $foo[$key1] - you need to read it first. But you don't need to know previous value (or its type) to overwrite it (it does not matter what is $foo[$key1] value if you do `$foo[$key1] = 1` - it works similar to `$foo = 1`); Regards, Robert Korulczyk