Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55160 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15876 invoked from network); 3 Sep 2011 17:22:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2011 17:22:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-yi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:39026] helo=mail-yi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/C2-24201-342626E4 for ; Sat, 03 Sep 2011 13:22:12 -0400 Received: by yie16 with SMTP id 16so3035282yie.29 for ; Sat, 03 Sep 2011 10:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=P1VS8lDa9hYXn5+EiPvdX3jkvZtJF23PQGxR9wH6Bt0=; b=tii6VgFzh1ry+/KbcDY07rz4VOEJ3Hnu0uBicx1o/UANu4RRI6zB9L6MOb9bd50TnG o4sNhdDPs5xEiympbUwxH66QL5QygvHH+3ZBgE/HHnUL7v0KQrFAQiyLPhi2Vo/ccpI0 GzaBfi+AMxf4+V9Kjvh4tXAwgUrogSPCyOe2o= Received: by 10.236.116.199 with SMTP id g47mr11266002yhh.44.1315070529146; Sat, 03 Sep 2011 10:22:09 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.236.43.131 with HTTP; Sat, 3 Sep 2011 10:21:49 -0700 (PDT) In-Reply-To: <4E62443C.9010603@toolpark.com> References: <4E39E89F.8060605@sugarcrm.com> <4E3A3643.2070305@toolpark.com> <4E3A4793.2070209@sugarcrm.com> <4E3A91E8.1020107@toolpark.com> <4E3ACA42.8000001@sugarcrm.com> <4E3BF930.9030701@toolpark.com> <4E3C5EDE.3030401@toolpark.com> <4E3D073A.9050709@toolpark.com> <4E412E3E.2@toolpark.com> <4E62443C.9010603@toolpark.com> Date: Sat, 3 Sep 2011 19:21:49 +0200 X-Google-Sender-Auth: l3l0dpV-1CYVEVnbeCN6j2pS8yI Message-ID: To: Lars Schultz Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf30363c6fbe90c304ac0cb7b8 Subject: Re: [PHP-DEV] [VOTE] Weak References From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --20cf30363c6fbe90c304ac0cb7b8 Content-Type: text/plain; charset=ISO-8859-1 > > $pseudoWeakMap = array(); > $pseudoWeakMap[spl_object_**hash($obj)] = new WeakReference($obj); > > or did I misunderstand the concept? I hope I'll have a chance to use > WeakReferences soon in my project;) I also believe that this is the logic, but from the doc, when an object is destroyed, its hash may be reused for other objects. So this implementation could possibly have bad side effect, isn't it ? Nicolas --20cf30363c6fbe90c304ac0cb7b8--