> $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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to