Re: [PHP-DEV] [RFC] Fix list() behavior inconsistency

[email protected] (Stas Malyshev)
Newsgroups php.internals
Organization SugarCRM
Message-ID <[email protected]>
Hi!

> Please take a look and make your opinion.
> 
> https://wiki.php.net/rfc/fix_list_behavior_inconsistency
> 
> This inconsistency might be interpreted like a bug, but fixing it might
> break existing PHP code (at least my attempt to fix it in documented way
> broke few phpt tests).

I think it makes sense to make list($a, $b, ...) = <something> to mean:
$a = <something>[0]
$b = <something>[1]
...etc...

This is how it works in most cases, not sure why it doesn't work when
<something> is a string literal, but I think it should work the same too.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.