Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77572 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28606 invoked from network); 24 Sep 2014 08:19:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2014 08:19:41 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.173 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.173 mail-we0-f173.google.com Received: from [74.125.82.173] ([74.125.82.173:62856] helo=mail-we0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/23-03797-C9E72245 for ; Wed, 24 Sep 2014 04:19:41 -0400 Received: by mail-we0-f173.google.com with SMTP id x48so4337769wes.18 for ; Wed, 24 Sep 2014 01:19:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=7fWEs4MsvfnO98VvFdFazsbzYB8obZCblTR6/BtwFuc=; b=cBSRw28Vxj0pU0bHvAg7A6bA/oI58IFG8tlN6sGj65hD5BrDwlusRmY2Pu3ss4R9p0 zlh/jC+K7q6ERD9BQKW/LreXGTrdG9N96NAF4R3y0r0b/j+HFsJTPgctCUg/68s3gdQj 4MR7WuVa5JUbUi4FXleuBIkqGAoN3AqFpUSnLLZPAsRsZU2kfk8yOXAFKq+vBm5E7HBN wwYiFXT+vnlytqZx9171WKaA7rjfC0JgtbjFL9xzHkEbJSkzKEHbteAN0Ym5OWF9WSF3 85eZvR9bJ2AN9f28fl5Yg3EK0celxuBcbmRHX2uLvCQIpEH+Ey/bFHBRy9mnDApyVAOD 77AA== X-Received: by 10.180.188.12 with SMTP id fw12mr9235994wic.83.1411546778156; Wed, 24 Sep 2014 01:19:38 -0700 (PDT) Received: from [192.168.4.120] (178-18-170-101.customer.bnet.at. [178.18.170.101]) by mx.google.com with ESMTPSA id t8sm4922941wib.8.2014.09.24.01.19.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Sep 2014 01:19:37 -0700 (PDT) Sender: Michael Wallner Message-ID: <54227E98.3050402@php.net> Date: Wed, 24 Sep 2014 10:19:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Stas Malyshev , Florian Margaine CC: PHP Internals 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> In-Reply-To: <54226509.8080405@sugarcrm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: mike@php.net (Michael Wallner) 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. -- Regards, Mike