Re: [RFC] UString

From: Date: Thu, 23 Oct 2014 13:53:23 +0000
Subject: Re: [RFC] UString
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-78274@lists.php.net to get a copy of this message
On Thu, 2014-10-23 at 11:38 +0100, Joe Watkins wrote: > It doesn't solve the problem directly but allows the programmer to solve > it for themselves, just like Object.hashCode in Java. The point is that it won't work in this way: $a = [ $ustring => $value ]; foreach ($a as $key => $v) { $key->ustring_method(); } but one needs something along the lines of $a = [ $ustring => $value ]; foreach ($a as $key => $v) { Utring::fromHashCode($key)->ustring_method(); } which likely looses object identity. It works but is not really nice :-) johannes

« previous php.internals (#78274) next »