Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77625 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64618 invoked from network); 25 Sep 2014 10:59:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2014 10:59:54 -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:51590] helo=mail.experimentalworks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/53-45824-7A5F3245 for ; Thu, 25 Sep 2014 06:59:52 -0400 Received: by mail.experimentalworks.net (Postfix, from userid 1003) id 034154247C; Thu, 25 Sep 2014 12:59:59 +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-25-104.dynamic.mnet-online.de [93.104.25.104]) (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 3F6344247A; Thu, 25 Sep 2014 12:59:55 +0200 (CEST) Message-ID: <1411642782.14092.25.camel@kuechenschabe> To: Florian Margaine Cc: Pierre Joye , Andrea Faulds , Stas Malyshev , Michael Wallner , PHP internals Date: Thu, 25 Sep 2014 12:59:42 +0200 In-Reply-To: References: <54213481.8080700@php.net> <54213ECC.5080204@php.net> <54214E57.3080200@php.net> <54220B80.5050208@sugarcrm.com> <54225D5B.3030402@php.net> <54226509.8080405@sugarcrm.com> <54227E98.3050402@php.net> <54231E06.90208@sugarcrm.com> <9E9CD624-B581-417B-9C9D-5202CA84D52D@ajf.me> 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] Invokation on __toString() for object used as array key From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Thu, 2014-09-25 at 12:22 +0200, Florian Margaine wrote: > Joe Watkins wrote (for fun) a new operator, `addressof`. Code is here: > https://github.com/krakjoe/php-src/compare/addressof > > I think it makes more sense than a new method on all objects. You could use > it for any kind of value: scalar, resource, object. Building an array of > sockets, for example, would be very easy with such an operator. For one this leaks quite some implementation details to userland which we shouldn't do aside from debugging features. Secondly this becomes unintuitive with value objects (see my DateTime example in this thread) johannes