Re: Foreach list behaviour

From: Date: Mon, 03 Sep 2012 17:50:45 +0000
Subject: Re: Foreach list behaviour
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-62761@lists.php.net to get a copy of this message
On 03/09/12 18:46, Sherif Ramadan wrote:
It should absolute not cast anything. list($a, $b) = $c; is the equivalent of saying $a = $c[0]; $b = $c[1]; In this case $c just happens to be a scalar value and as such you can not derive anything from the scalar value in that context. It is implicitly null. Ah, I guess I'm confusing GML and PHP array semantics, somehow... my bad.
-- Andrew Faulds http://ajf.me/

« previous php.internals (#62761) next »