Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87583 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59651 invoked from network); 3 Aug 2015 17:56:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2015 17:56:50 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.174 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.174 mail-pd0-f174.google.com Received: from [209.85.192.174] ([209.85.192.174:33196] helo=mail-pd0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/D1-44469-16BAFB55 for ; Mon, 03 Aug 2015 13:56:49 -0400 Received: by pdbnt7 with SMTP id nt7so76638528pdb.0 for ; Mon, 03 Aug 2015 10:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=MiKJd+JmQlGpBcez98ggBgnKfDVvQWHC7MrfLJNf8JQ=; b=FtdkjDQhfvNOuyUNjfIB4XztUy7t6q0S6X/nkNVYwXC9FJYhHEE1LNX8aLbKuMjeRM CbbuVfAz/m1DAdHmeVmT1GK1rBOi68Q8c/icarhQfL6IdvS0CW8GueB56HtMSVnfu0tE oIGDAlbKEFSH9a7KktcC3NzEZzqHDl5dqCG1j2BBdiraW5u34tNCYSBlrdTfVs0nGrhN PgYSMMGFCKe+VpsGdlQwUVvftVzzYlf6bWbUYTrQFJgAmH91XWfNSPCstsfYP8EZRfF1 BEwOfPoFPVgI6+ucCXGjofKJIHYDTNlMOL6eOxP5P1gExt7b3HZ5/sGXwYu2/sTt/76H ZYLw== X-Received: by 10.70.123.72 with SMTP id ly8mr38428771pdb.134.1438624606680; Mon, 03 Aug 2015 10:56:46 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by smtp.gmail.com with ESMTPSA id hk4sm8599461pbb.80.2015.08.03.10.56.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 10:56:45 -0700 (PDT) To: Bob Weinand , Derick Rethans References: Cc: Julien Pauli , PHP Internals Message-ID: <55BFAB53.9050802@gmail.com> Date: Mon, 3 Aug 2015 10:56:35 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Exposing object handles to userland From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > Ehm, you realize that object id is only reset because the old object is freed? As long as the target object is referenced, nothing will have the same object id. Yes, but if you use it as some sort of ID - e.g. as in "did I already create a object of class X with parameters stated in class Y" and use class Y's object ID as a key for that, you're in for a nasty surprise if some other code deletes that object and creates new object of class Y with the same ID but completely different content. That's what one of the code examples referred to in this thread was doing, if I understood it correctly. Which only goes to emphasize my point - a lot of the people that want object IDs are either using them wrong or plan to use them wrong. And wrapping more rope around their necks is not exactly what we should be doing. -- Stas Malyshev smalyshev@gmail.com