Hi:
   this is expected behavior,  like:
<?php
list($a, $b) = 1;
var_dump($a);

thanks

On Mon, Sep 3, 2012 at 7:07 AM, Jared Williams
<jared.willi...@ntlworld.com> wrote:
> Hi,
>
>         Just looking at the foreach list behaviour and it does this...
>
> $i = [1, 2, 3];
> foreach($i as list($a, $b))
>         var_dump($a, $b);
>
> Outputs....
>
> NULL
> NULL
> NULL
> NULL
> NULL
> NULL
>
> There is no test I can see covering this, so cannot tell if its
> expected.
>
> To me, $i does not meet the expected format, so should be some sort of
> error happening.
>
> Jared
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

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

Reply via email to