Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33021 invoked from network); 24 Sep 2014 08:41:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2014 08:41:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; 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:60676] helo=mail-qa0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/04-03797-3C382245 for ; Wed, 24 Sep 2014 04:41:40 -0400 Received: by mail-qa0-f50.google.com with SMTP id j7so2735540qaq.37 for ; Wed, 24 Sep 2014 01:41:36 -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; bh=639t4NKOaa+3sFAHo1WDDUUVGnS6srvdnfwz1i8oFFE=; b=QrijQJFTVuTkgove8FlHizks84ct3aNUfbSxgDFUXQHiwgG0/WBQNy1KHrOqVlL+Za B/czh+qRmW9STSknle+/K1CeJQERfddYdKy2Mcfa9RPfx/qoo3Dad49RKvZ4u+dFR6G/ Comij9QrOB3FZVOGYOT3oEt2CsasqVJGBiQHE/0nog8nTJ/sQAb0HReBMf3gonzXgQLV 6KOyxg9wMSs/2KR2jlImmNbtWLL2yDd0+vNloYwCQ3XK5lyHAplHIZq4yj++/ejLTI1e OniuF7HIB69/N/xcHgqs6QnqYj3P803X5wkg77SoIx5VWDA+e+I386XNEFqKZQ30e2X6 I0xA== MIME-Version: 1.0 X-Received: by 10.140.49.71 with SMTP id p65mr7524929qga.54.1411548096678; Wed, 24 Sep 2014 01:41:36 -0700 (PDT) Received: by 10.140.22.51 with HTTP; Wed, 24 Sep 2014 01:41:36 -0700 (PDT) Received: by 10.140.22.51 with HTTP; Wed, 24 Sep 2014 01:41:36 -0700 (PDT) In-Reply-To: <54227E98.3050402@php.net> 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> Date: Wed, 24 Sep 2014 10:41:36 +0200 Message-ID: To: Michael Wallner Cc: PHP internals , Florian Margaine , Stas Malyshev Content-Type: multipart/alternative; boundary=001a11351c36e2d6130503cba638 Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: pierre.php@gmail.com (Pierre Joye) --001a11351c36e2d6130503cba638 Content-Type: text/plain; charset=UTF-8 On Sep 24, 2014 10:19 AM, "Michael Wallner" wrote: > > On 24/09/14 08:30, Stas Malyshev wrote: > > Hi! > > > >> Well, then let's remove this restriction from resources, too. > > > > Not sure what use would it be for resources - resource IDs are not > > controlled by user code and for all intents and purposes are opaque > > numbers, which also do not have to be unique over the life of the > > script. What use would it be to index by those, especially by implicit > > convert? I don't think right now we have implicit convert of resources > > to ints anywhere, like we do have with __toString. > > > > There's currently no way to associate any data with a resource, except > by its ID. > > $context[(int) $resource] = ...; > > IIRC resources *were* implicitely converted to integers up until a > specific version, I'll have to look that up in history, though. > I also wonder why we still need them. Doing what has been done with gmp for all resources would be a good move for 7. --001a11351c36e2d6130503cba638--