Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77624 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63193 invoked from network); 25 Sep 2014 10:57:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Sep 2014 10:57:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=florian@margaine.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=florian@margaine.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain margaine.com from 209.85.213.172 cause and error) X-PHP-List-Original-Sender: florian@margaine.com X-Host-Fingerprint: 209.85.213.172 mail-ig0-f172.google.com Received: from [209.85.213.172] ([209.85.213.172:43746] helo=mail-ig0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/03-45824-825F3245 for ; Thu, 25 Sep 2014 06:57:44 -0400 Received: by mail-ig0-f172.google.com with SMTP id a13so8207857igq.17 for ; Thu, 25 Sep 2014 03:57:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=w471G1yLz9jNKqQ2BTQeobQw13xhLjDH6Dqm68bWSX4=; b=TcL2t2Tgi0BT8Ohm9o97M2TnpkLus8QBpy0kR10JUKq29g1oAwomLlQa0Q2gGetMol UgDzl90xvW9UbslBZClHh5fFf/vswhtnMnZFwqt6eyfws7aG4NCrZUkI7hXR+T9Rd2bq D+Wj0bs2CzXOrtgRU1HC0tOZnXM+10yJ7hpGOGr8EdrGbn+b7r8B9I6fqDmpi8H6Hpea S7KH+TP3NKIV5PpfW3K/FAOYBD7E8HlfDaQYpMWlEgLGJffBNHUqs0QR9MxWAblA0n3+ aW8yTRUXOvAxHNNZdDBTFrKmT0UoEJD8XADVd8wF425h1sarLXevi8J/Dj0KQ8xDU9td 47ZA== X-Gm-Message-State: ALoCoQl0zaHNLu8iqwCIgzlyplXu7t7/cXhhsy48DkvCxLkCMkyMkQEJesKQzh2kYtvejK9Mdbdx MIME-Version: 1.0 X-Received: by 10.50.122.70 with SMTP id lq6mr3503181igb.8.1411642661694; Thu, 25 Sep 2014 03:57:41 -0700 (PDT) Received: by 10.107.5.194 with HTTP; Thu, 25 Sep 2014 03:57:41 -0700 (PDT) X-Originating-IP: [80.215.133.108] Received: by 10.107.5.194 with HTTP; Thu, 25 Sep 2014 03:57:41 -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:57:41 +0200 Message-ID: To: Pierre Joye Cc: Michael Wallner , PHP Internals , Stas Malyshev , Andrea Faulds Content-Type: multipart/alternative; boundary=089e015383346692df0503e1ab71 Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: florian@margaine.com (Florian Margaine) --089e015383346692df0503e1ab71 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 25 sept. 2014 12:54, "Pierre Joye" a =C3=A9crit : > > On Thu, Sep 25, 2014 at 12:22 PM, Florian Margaine wrote: > > 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 use > > it for any kind of value: scalar, resource, object. Building an array o= f > > 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. The thing is, we already expose it through references, but we don't give any tool to help people debug them. > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org --089e015383346692df0503e1ab71--