Re: Re: Syntactic improvement to array
| From: | Andrei Zmievski | Date: | Mon, 05 Feb 2007 19:17:50 +0000 |
| Subject: | Re: Re: Syntactic improvement to array | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27823@lists.php.net to get a copy of this message | ||
Good question. If it's possible to make it behave this way, I don't see why not. On the other hand, if you take list(), it can't be used in RHS.
-Andrei
On Feb 5, 2007, at 10:28 AM, Todd Ruth wrote:
Would this be legal? function f() {return [ 1, 2 ];} $x = [ $a, $b ] = f(); In the end, would we have...? $a = 1; $b = 2; $x = array(1,2); I'm not trying to be positive or negative about the syntax. I'm just "testing" somewhat edge cases. - Todd