Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75514 invoked from network); 27 Oct 2014 01:37:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2014 01:37:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.171 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.171 mail-pd0-f171.google.com Received: from [209.85.192.171] ([209.85.192.171:50452] helo=mail-pd0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/A2-56216-3D1AD445 for ; Sun, 26 Oct 2014 20:37:23 -0500 Received: by mail-pd0-f171.google.com with SMTP id r10so4647336pdi.30 for ; Sun, 26 Oct 2014 18:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=HSqO1OvQg5ShBtQ/GK+sxTu6/vMky3Kg/KyYhjvVHfw=; b=vGFqupWM6K3hV64A/vmvxprwhIiLV4IChL5TZM2GqAbR9CPAP0DS7M+exHygdlt5On PHRp+1WoENIH9kciL6cl8Y7ShW2L0D89RK4/dLLllXvE90loX2tRQspovOVwcTyfUh3L dq8ITS9iJXvmvDW115QxwfPul0G3Ey0DM4Q1yI5gBwr2j7GyiArJnDAhh8FRzjJKnI/f h3CTuySTUspeeIrtLwOSDs4olKMBmOiTaxPSDB2UDtRHXp1j34UR8rnisK3Ci4vINKt9 e54tfTDPSA8WGhRCqQrUKmI7Tk6cJ/o4BqGZt1sWhj6ZNPnHNsT/xkUTwVhsdGrBX6oK cdPA== X-Received: by 10.66.231.72 with SMTP id te8mr1557627pac.77.1414373840053; Sun, 26 Oct 2014 18:37:20 -0700 (PDT) Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id fn2sm9294625pdb.75.2014.10.26.18.37.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Oct 2014 18:37:19 -0700 (PDT) X-Google-Original-From: Stas Malyshev Message-ID: <544DA1CD.9070109@php.net> Date: Sun, 26 Oct 2014 18:37:17 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [RFC] Using objects as keys From: smalyshev@gmail.com (Stas Malyshev) Hi! I would like to present to your attention an RFC about using object as keys: https://wiki.php.net/rfc/objkey It was discussed in the past on the list: http://marc.info/?t=141145969600001&r=1&w=2 and I think it makes sense to propose a formal RFC for it. Both the text and the code in the patch includes bits done by myself and Joe Watkins. The patch does not cover 100% of cases but should work for most reasonable scenarios, if something is wrong or you have ideas how to make it better please tell. The name __hash is not final, I am open to using __toKey instead or any reasonable alternative, we may also include a couple of options in the vote if that will be a point of disagreement. Thanks, Stas