Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87571 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23232 invoked from network); 3 Aug 2015 11:29:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2015 11:29: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.212.172 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:37186] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/F1-13081-7805FB55 for ; Mon, 03 Aug 2015 07:29:11 -0400 Received: by wibud3 with SMTP id ud3so109598993wib.0 for ; Mon, 03 Aug 2015 04:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=MmRIDFlY/8NGgcwTWT66g7Ub2YTtQ+f+R66LN5SqaUA=; b=EAmUh5J5cqV2loKseM/VhPIaADfC4gL8HovUMr/4VxVk/fqAcblNpSB44tACJ3ZlYV 1B8BspZcQQ//AujGm/BoAD9tF5bSp7+BtQYxXjnipRFClRAQ3G9yfQ0ezPmfCKiELzY7 5wmQIUkHPoIeh36GdW0lu4E+yw9Kb6JSuLLqzhsbhRLmMSEYUfjigCMetUUFpwKK20qs d1Xsa7NJKXhFz4rkIOdLuC5An+5UXzGCS2ag+vFEVafXmbvkH7TaOG9RXbbVflJlr0sq 67PivgJ+ncGhPznhq3o58nwfJByKarHSZBUQMSpkM6wAu8ew2BVFy4+JDgwgqBAT6iIH CQFQ== X-Received: by 10.194.192.99 with SMTP id hf3mr31862769wjc.78.1438601348330; Mon, 03 Aug 2015 04:29:08 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.27.172.10 with HTTP; Mon, 3 Aug 2015 04:28:48 -0700 (PDT) In-Reply-To: References: <024101d0cbaa$f864aa50$e92dfef0$@belski.net> <55BDBE25.5050104@gmail.com> <55BE5B89.5080103@gmail.com> <4557ED13-5446-45F1-8E04-A01F8A066600@gmail.com> Date: Mon, 3 Aug 2015 13:28:48 +0200 X-Google-Sender-Auth: 43SIrG0zximCKq1a7chbYVA-b78 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bae469657392c051c667aba Subject: Re: [PHP-DEV] Exposing object handles to userland From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --047d7bae469657392c051c667aba Content-Type: text/plain; charset=UTF-8 > >- more importantly for users, these ids couldn't be compared to > >var_dumps'. > > Why do you need to compare the output of two dump functions? Just add a > note to the documentation that these are not the same IDs. > That's not a strong feature, but still, it makes the tool a little bit more comfortable to use. Oh, and an other benefit of the handle is that it gives a rough estimation of the number of objects created and their instantiation order. When debugging, any hints count. For VarDumper, I don't need spl_objet_id(). As we spotted, the code is already able to get the number it needs. Having spl_object_id() is still a feature that is not exposed to userland, but that is useful as I tried to demonstrate. --047d7bae469657392c051c667aba--