> On Oct 30, 2014, at 6:20 PM, Lester Caine <les...@lsces.co.uk> wrote: > > On 30/10/14 17:42, Rowan Collins wrote: >> The use case which came up recently was UString objects, which can >> easily be converted to and from plain PHP strings, but would be useful >> as keys in their own right. With current PHP you could do $foo[ >> (string)$u_str ] = $bar; with the proposed RFC, you could do $foo[ >> $u_str ] = $bar with the same result; but either way, you would still >> need to convert *back* to an object in order to use any of the UString >> methods in a foreach(), array_walk(), etc. > > I would still like to see the debate on proper use of unicode IN PHP > strings. Pushing that problem into objects is just as wrong as this > debate. If I'm using a unicode colation to sort a set of array keys then > the KEY should be unicode, not yet another handle to a secondary object > which the needs to be sorted ... but then perhaps we need this fiddle to > avoid the complexity that unicode can create?
I agree it’s high time Unicode be in PHP, but we are calling this PHP 7 and not 6 for a reason. The lessons learned in the difficulties of implementing Unicode directly in the language were a direct player in the death of PHP 6. We need to keep that in mind as we’re continuing these types of discussions. The only time I see this being an issue related to Unicode (short-term) is if we do not implement a language-integrated collation option. For example, if the solution for collation in general is to use a built-in class or similar function, we will run into these issues. However, if the assumption is we will allow collations to be configurable - or assume Unicode in some fashion, the weight of this effort will be on the implementation of Unicode and not so much this. As it stands right now, the RFC wiki seems to have no references to Unicode implementation beyond 2010’s end of PHP6. > > -- > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php