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
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php