Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:30409 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97011 invoked by uid 1010); 2 Jul 2007 17:52:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96995 invoked from network); 2 Jul 2007 17:52:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jul 2007 17:52:10 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:35207] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/2B-24153-84B39864 for ; Mon, 02 Jul 2007 13:52:09 -0400 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 2 Jul 2007 10:52:05 -0700 Message-ID: <46893B43.1020907@zend.com> Date: Mon, 02 Jul 2007 10:52:03 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Sebastian Bergmann CC: internals@lists.php.net References: <468519DC.8060502@widescreen.ch> <585221804.20070701154538@marcus-boerger.de> <002701c7bc28$8279c2c0$876d4840$@com> <4688808A.7030706@zend.com> <46893931.1020000@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Jul 2007 17:52:05.0096 (UTC) FILETIME=[B39D3680:01C7BCD1] Subject: Re: [PHP-DEV] toString() and Object #ID From: stas@zend.com (Stanislav Malyshev) > We could add a counter that gets incremented for each object that is > created and associate that number with the object. Wouldn't that solve > the problem (if there is one)? It would solve it, but it would require modifying each extension dealing with objects in order to register all objects in this global registry and of course it would require adding another value into object structure. I'm not sure having running numeric ID is that important. If you just need to know if two variables are the same object, you have ===. If you need to index by it, you have the hash. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com