> From: Ilia Alshanetsky [mailto:i...@prohost.org] 
> 
> As long as it works on a premise that a "string" is a byte array and
> each element represents 1 byte, +1 from me.

Code written on this premise is almost always bug central when people finally 
get around to realizing why they really do need to support wide characters (and 
everybody does, because people like to paste stuff containing non-break-spaces, 
and decorative quotes). I really don't think this single byte character 
mentality should be encouraged.

Also, how do you think this will work with the Unicode conversion in PHP 6? 
Guaranteed, this will break stuff. Some people will have written code to 
iterate characters, assuming single byte characters, some people will have 
written code ACTUALLY intending to iterate as a byte array. Sadly, we can 
almost certainly assume that the single byte characters assumption (which is 
wrong) will also be, by far, the most common. Supporting that most common case 
when moving to PHP 6 would require breaking the binary case (which was the only 
properly written code in the first place.) On the other hand, supporting the 
binary case means breaking the most common case.

John Crenshaw
Priacta, Inc.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to