Philip Olson wrote:
> Hello, the following behavior seems odd:
>
> $foo = array('a' => 'apple', 'b' => 'banana');
>
> // Notice - Undefined offset: 1
> // Notice - Undefined offset: 0
> list($a,$b) = $foo;
Isn't this line should be
list($a, $b) = array_keys($foo);
or
list($a, $b) = array_values($foo);
>
> // This of course works as expected
> while(list(,$ab) = each($foo)) {
> print $ab;
> }
>
> I recently documented this numerical requirement (starting
> at 0) as a <note> but find it odd. This is mentioned as a
> bug in a few places but I can't find any closed reports.
> It's a pretty good feature request, right?
I might miss you point, since it seems we are
going to make these feature requests bogus.
--
Yasuo Ohgaki
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php