On 26/01/2022 17:13, Rowan Tommins wrote:
For instance, the following code is safe, useful, and readable:
$countsByDayByCategory = [];
foreach ( $someData as $item ) {
$countsByDayByCategory[ $item['day'] ][ $item['category'] ]++;
}
I myself am not planning to hold a vote on undefined array.
If there were one it would be an independent vote the same as "Undefined
Array Index" in https://wiki.php.net/rfc/engine_warnings which promoted
it to warning in 8.0.
As it's marked as a warning, I would expect it to still get upgraded at
some point in PHPs lifetime, maybe even in PHP 9, but I am not proposing
it with this batch of updates.
Mark Randall
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php