Re: [VOTE] Fix list() behavior inconsistency

From: Date: Thu, 25 Sep 2014 22:10:27 +0000
Subject: Re: [VOTE] Fix list() behavior inconsistency
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-77639@lists.php.net to get a copy of this message
I told it doesn't support strings and objects because it was designed this way. I don't know who and when did it. It's not complicated to change it in any way. The question which way is better, and it's the reason of voting. I would prefer not to extend list() to support strings, but in case "enabling" would win, I'll make it. Thanks. Dmitry. On Fri, Sep 26, 2014 at 1:50 AM, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > > > It was on design. list() was intended to support plain arrays only. > > I'm not sure I'm getting this point - why list($a, $b) = $foo is not > just translated as $a = $foo[0], $b = $foo[1], etc.? Is it hard to make > it work that way? > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ >

« previous php.internals (#77639) next »