Re: [VOTE] Fix list() behavior inconsistency
| From: | Lester Caine | Date: | Fri, 26 Sep 2014 07:35:27 +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-77648@lists.php.net to get a copy of this message | ||
On 26/09/14 08:08, Leigh wrote:
> My points are:
>
> * Strings are _not_ treated as arrays of bytes everywhere.
> * If we intend to give strings more array-like support after this RFC
> (like foreach($string as $char), making array_* work with strings),
> then I support the list() change.
> * Otherwise not
At what point does is_array(string) = true?
That is my 'interpretation' of $a[?] over $a where $a is a string.
So the statement 'Disable string handling in all cases' is simply wrong
since $a[0] is NOT a string but is working perfectly as designed. It
would be inconsistent to now treat the array $a[0] as if it wasn't an array.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk