Re: [RFC] Reclassifying engine warnings

From: Date: Fri, 13 Sep 2019 08:04:41 +0000
Subject: Re: [RFC] Reclassifying engine warnings
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-107050@lists.php.net to get a copy of this message
On 12/09/2019 22:56, Andreas Hennings wrote:
$var[$k0][? $k1][? $k2]++; This is great but the second "?" is redundant isn't it?
If the rule is "you cannot read a non-existent array element without ?" then no: $var[$k0][? $k1] allows you to read that element, and from context treat it as an array; but that array won't have a key $k2, so you also need to say that reading *that* was deliberate, and from context treat it as an integer. Regards, -- Rowan Tommins (né Collins) [IMSoP]

« previous php.internals (#107050) next »