Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63272 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32807 invoked from network); 7 Oct 2012 23:48:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2012 23:48:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:44587] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/75-07529-AE412705 for ; Sun, 07 Oct 2012 19:48:59 -0400 Received: by mail-lb0-f170.google.com with SMTP id gm13so2618304lbb.29 for ; Sun, 07 Oct 2012 16:48:55 -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=DJzoI6h+Tb/lY+Jy5FQvNOau/k9jhjgVW8/xoUWDLyU=; b=dpQpDQoPo3Jq4UdR0VSUWKIxEpHEnNZG2poXVKO2U1VrxxNNMyGct/SfyMzgS2cIUu F9Xu6ynWl62mZijKdXSz8haq8rXDwoTPD/QWZQbIB5c88PdYqwCikiMLF8CHmDqyKRlN cG3vR3jbraEvMHEmbURB9C54HdyGgWjHLb2EXvrNT0IIlm5XzM/EzSD3s3lqmu1Y4CCb Bj6MkLxk9PjEq3aniJTCAuwupegSHsXwCyoG45J5EncNnlggByvTde/L9hwKZguj0TWX 4QBXw13518j2zwqy70O7LkRwJTi9Z82DKPN2ztEPAG7LOGXkWKwmBNaAmlkNKnUhdNej k38w== MIME-Version: 1.0 Received: by 10.152.148.8 with SMTP id to8mr3844688lab.2.1349653735430; Sun, 07 Oct 2012 16:48:55 -0700 (PDT) Received: by 10.112.12.178 with HTTP; Sun, 7 Oct 2012 16:48:55 -0700 (PDT) In-Reply-To: References: Date: Sun, 7 Oct 2012 19:48:55 -0400 Message-ID: To: Rasmus Schultz Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Arrays which have properties of sets From: theanomaly.is@gmail.com (Sherif Ramadan) On Sun, Oct 7, 2012 at 7:07 PM, Rasmus Schultz wrote: > Yeah, on that note - I've never understood what use this function is, > as it reuses object IDs... it will return the same hash for two > different objects during the same script execution - so it's unusable > as far as getting unique keys for objects... and I don't know what > else you could really use it for? > Sorry, forgot to reply to all here... No it's not. "Reuses object IDs" here just means when an object is destroyed it no longer exists in memory and thus its hash becomes reusable, which makes absolutely perfect sense to me. This does not make it "unusable as far as getting unique keys for objects". The keys are unique for all the objects that exist in memory at that time. If an object is destroyed (it no longer exists in memory), why would you still need to retain a unique key for it? Do you keep keys for nonexistent doors as well? > On Sun, Oct 7, 2012 at 5:01 AM, Pierre Joye wrote: >> >> Object hash may be what you are looking for. >> >> http://php.net/manual/en/function.spl-object-hash.php > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >