Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78274 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87377 invoked from network); 23 Oct 2014 13:53:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 13:53:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.215.10 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.215.10 mail.experimentalworks.net Received: from [217.114.215.10] ([217.114.215.10:48594] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 79/97-41150-B5809445 for ; Thu, 23 Oct 2014 09:53:32 -0400 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id 4CD4C45C6C; Thu, 23 Oct 2014 15:53:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on km31408.keymachine.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 X-Spam-HAM-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Received: from [192.168.2.34] (ppp-93-104-7-154.dynamic.mnet-online.de [93.104.7.154]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: johannes@schlueters.de) by mail.experimentalworks.net (Postfix) with ESMTPSA id 3B80845964; Thu, 23 Oct 2014 15:53:42 +0200 (CEST) Message-ID: <1414072403.3228.3.camel@kuechenschabe> To: Joe Watkins Cc: Dmitry Stogov , Stas Malyshev , Philip Hofstetter , PHP Internals Date: Thu, 23 Oct 2014 15:53:23 +0200 In-Reply-To: <1414060726.2624.60.camel@localhost.localdomain> References: <1413875212.2624.3.camel@localhost.localdomain> <54469840.3070708@sugarcrm.com> <1414051917.2624.35.camel@localhost.localdomain> <1414060726.2624.60.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] UString From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) 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