Re: [RFC] Reclassifying engine warnings

From: Date: Fri, 13 Sep 2019 09:40:34 +0000
Subject: Re: [RFC] Reclassifying engine warnings
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-107071@lists.php.net to get a copy of this message
> $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

« previous php.internals (#107071) next »