Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72469 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14382 invoked from network); 11 Feb 2014 20:07:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2014 20:07:15 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.173 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.173 mail-wi0-f173.google.com Received: from [209.85.212.173] ([209.85.212.173:62367] helo=mail-wi0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/DA-62230-1F28AF25 for ; Tue, 11 Feb 2014 15:07:15 -0500 Received: by mail-wi0-f173.google.com with SMTP id hn9so5249383wib.0 for ; Tue, 11 Feb 2014 12:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=YaTTlFdDhVn5yalq32cddI77Swot2t0sGY2UupMMLIk=; b=YiRMK01B7/NiEgIZA/Izv6KWH2owrN66NMjHQFj5boTbLrE/XAI3o5mb8ad1Mc8p9h hwBV6+1JogfibwNhOfgeYPP/A0cErdK2jtyemGbDK3BhxIm32eV3Oxdpt7eZ7R3MwFac TM06VX2X82Zjj2aA+ptQ3u78UTE/e2W6hmHIuiyCBvyvrS4wK/OFD/w3VqaXtX+D+niu mzuSWgRKtnN8YyIz+jpKHvrAJvfOHG7qXjHDKyjj/62UjREwCieduBLjA4rsaWvXxipd ETfG4jYW32vqqSLFuSwy/B6qI4xvD3avLjLpuWpULIDCKA3UOGSXPwB4WBJ7fZKa+Lr2 Dt/A== X-Received: by 10.180.13.5 with SMTP id d5mr54404wic.54.1392149230984; Tue, 11 Feb 2014 12:07:10 -0800 (PST) Received: from [192.168.0.2] (cpc19-brig17-2-0-cust25.3-3.cable.virginm.net. [81.101.201.26]) by mx.google.com with ESMTPSA id j9sm46480390wjz.13.2014.02.11.12.07.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 12:07:10 -0800 (PST) Message-ID: <52FA82DD.9030909@gmail.com> Date: Tue, 11 Feb 2014 20:06:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: internals@lists.php.net References: <52F00437.7010903@googlemail.com> <52F005E6.6090702@googlemail.com> <52F0D36B.7010905@googlemail.com> <52F29880.6050304@googlemail.com> <52F29B04.9080609@googlemail.com> <52F9D766.1090902@googlemail.com> <52FA6C08.5050207@googlemail.com> In-Reply-To: <52FA6C08.5050207@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [VOTE] __debugInfo() From: rowan.collins@gmail.com (Rowan Collins) On 11/02/2014 18:29, Crypto Compress wrote: > Imagine a proxy object (orm). > > Usecase #1: end-user > Sees only proxied object. No cluttered object graph. Very useful! > > Usecase #2: new maintainer > Hunting bug in proxy object. No way to dump internals at all. Wait what? > On the other hand, usecase #3: hunting bug in incredibly complex object and "can't see the wood for the trees" because object graph fills pages of output. Temporarily (re-)implement __debugInfo() to output a few relevant properties, and all becomes much clearer. I could have used this earlier today, in fact; I ended up with something like dump( array($this->foo, $this->bar, $this->baz) ) There might be merit in a way of viewing the "real" contents of an object, I guess, although that doesn't have any meaning for objects exposed by extensions anyway, as they can overload in ways user-land can only dream of. (Hence SimpleXML being so confusing if you try to debug it as though it were a "real" object.) -- Rowan Collins [IMSoP]