Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77623 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60423 invoked from network); 25 Sep 2014 10:54:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2014 10:54:15 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.50 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.50 mail-qa0-f50.google.com Received: from [209.85.216.50] ([209.85.216.50:55225] helo=mail-qa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AB/52-45824-654F3245 for ; Thu, 25 Sep 2014 06:54:15 -0400 Received: by mail-qa0-f50.google.com with SMTP id j7so4430613qaq.9 for ; Thu, 25 Sep 2014 03:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=AZZ0RAp0/5mKCs41E40XOlZ/6nz34jM+sIx41Ms/5VE=; b=qe1Wz1pk6e+yjK3qvdUgooFQUlq9tLHwDeMEm2CVQ0B4pPkc9r/QtBgXzNsUOjHyTm I7X0TOoQh4i1tnbok2W3/jxAItoBg1JkGe1MPUY74FZ5KlOLTPymO4a/FbBaN+3qmm1w 6IB9BDiirhHz6N2K2+HViJZOa7WStGuYwSNYNM8pqf90xszbQrQGVHCuU5pgoLQA54Ct 2e280B2Ab2F3zuSY1zNN2usezwXOiOe+cgXAr+yxgGk3lZeJ119XzK4VPiesn1JGyjxC Yj/4+TqWj0IRqViVBubvMGQe5pk6VuWO6f+tfn60KJTaywZA5OO0NMIB01uLP0RR00RM fG7A== MIME-Version: 1.0 X-Received: by 10.140.49.71 with SMTP id p65mr19197342qga.54.1411642452719; Thu, 25 Sep 2014 03:54:12 -0700 (PDT) Received: by 10.140.22.51 with HTTP; Thu, 25 Sep 2014 03:54:12 -0700 (PDT) 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> Date: Thu, 25 Sep 2014 12:54:12 +0200 Message-ID: To: Florian Margaine Cc: Andrea Faulds , Stas Malyshev , Michael Wallner , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: pierre.php@gmail.com (Pierre Joye) On Thu, Sep 25, 2014 at 12:22 PM, Florian Margaine w= rote: > Hi, > > 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 u= se > it for any kind of value: scalar, resource, object. Building an array of > sockets, for example, would be very easy with such an operator. > > It would also give better tools to deal with situations such as: > > $test =3D 1; > $test2 &=3D $test; > > I'm willing to write an RFC if necessary to include it. > > Thoughts? =C2=B4 Not sure what is the relation with resource as objects but I am not sure either about exposing the internal position to the userland. That will pretty much forces to keep it this way forever if we expose it for anything but debugging. Cheers, --=20 Pierre @pierrejoye | http://www.libgd.org