Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89078 invoked from network); 23 Oct 2014 14:00:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2014 14:00:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:58612] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/F7-41150-5E909445 for ; Thu, 23 Oct 2014 10:00:05 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id E91E98C0080; Thu, 23 Oct 2014 09:59:59 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JcThsVnIaSx2; Thu, 23 Oct 2014 09:59:59 -0400 (EDT) Received: from [10.128.51.44] (dab-far1-h-1-2.dab.02.net [82.132.220.222]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 0AE7A8C007B; Thu, 23 Oct 2014 09:59:57 -0400 (EDT) References: <1413875212.2624.3.camel@localhost.localdomain> <54469840.3070708@sugarcrm.com> <1414051917.2624.35.camel@localhost.localdomain> <1414060726.2624.60.camel@localhost.localdomain> <1414072403.3228.3.camel@kuechenschabe> Mime-Version: 1.0 (1.0) In-Reply-To: <1414072403.3228.3.camel@kuechenschabe> Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: quoted-printable Message-ID: <87D717D5-273B-4A32-A3E5-83EBDFD314CB@ajf.me> Cc: Joe Watkins , Dmitry Stogov , Stas Malyshev , Philip Hofstetter , PHP Internals X-Mailer: iPhone Mail (12B411) Date: Thu, 23 Oct 2014 14:59:46 +0100 To: =?GB2312?Q?Johannes_Schl=A8=B9ter?= Subject: Re: [PHP-DEV] [RFC] UString From: ajf@ajf.me (Andrea Faulds) > On 23 Oct 2014, at 14:53, Johannes Schl=A8=B9ter w= rote: >=20 >> 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. >=20 > The point is that it won't work in this way: >=20 > $a =3D [ $ustring =3D> $value ]; > foreach ($a as $key =3D> $v) { > $key->ustring_method(); > } >=20 > but one needs something along the lines of >=20 > $a =3D [ $ustring =3D> $value ]; > foreach ($a as $key =3D> $v) { > Utring::fromHashCode($key)->ustring_method(); > } >=20 > which likely looses object identity. >=20 > It works but is not really nice :-) u($key)->split(',')->... works :) -- Andrea Faulds http://ajf.me/=