Re: [VOTE] Fix list() behavior inconsistency

From: Date: Fri, 26 Sep 2014 07:16:04 +0000
Subject: Re: [VOTE] Fix list() behavior inconsistency
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-77647@lists.php.net to get a copy of this message
Hi! > * Strings are _not_ treated as arrays of bytes everywhere. This is true. However, sometimes they are. E.g., $string[0] is meaningful, while array_flip($string) is not. > * If we intend to give strings more array-like support after this RFC We don't intend to give strings anything - both $string[0] and list($a, $b) = $string works right now. See here: http://3v4l.org/7AZFZ So you are arguing for BC break for no reason at all. > (like foreach($string as $char), making array_* work with strings), Nobody proposed that in this RFC, and it makes zero sense to propose it in this RFC, as this RFC is about list(), not about making strings into arrays which would require humongous amount of work and was not requested by anybody. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

« previous php.internals (#77647) next »