Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17546 invoked from network); 11 Feb 2014 20:23:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2014 20:23:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=cryptocompress@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cryptocompress@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.212.175 as permitted sender) X-PHP-List-Original-Sender: cryptocompress@googlemail.com X-Host-Fingerprint: 209.85.212.175 mail-wi0-f175.google.com Received: from [209.85.212.175] ([209.85.212.175:41455] helo=mail-wi0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/8B-62230-9D68AF25 for ; Tue, 11 Feb 2014 15:23:54 -0500 Received: by mail-wi0-f175.google.com with SMTP id hm4so5277830wib.2 for ; Tue, 11 Feb 2014 12:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=tmtBCDgjZ8q7N829wnI6Wq/jYghDxWg3YaGXvd6m1VA=; b=TRY2WDjt2xL3LBiP7dODrkXgR3++23ObGIwPTPzcCdFS9ens0rfgLT9Rvmx8Rgq9AF B5Wk6nbMvWDFlCk2aoqvl4TouiNzXJTMyuh8BPe8WHn9ifsCbsqhNlel7sZRgTjKekeZ cxXmFQS1XtZaMOnra5uj3biemPgdvpQUD3xj90WHVoPifyM2P1S3/6ORlzf0Sbe8X8r2 TKi7VpLm99C/AJxpwGdVNqwrPvwWmUfKsvu+Ofgh3y1a3Kz7yyTpwvJHvjJU9W3+HOVh vX2KbNI+Qd74I/1T5nUxo57I4lJ/zKeor5aageG+9mPDKmDTTX58obqpe496x5hDBF9t z4dA== X-Received: by 10.194.185.237 with SMTP id ff13mr28464wjc.64.1392150228914; Tue, 11 Feb 2014 12:23:48 -0800 (PST) Received: from [192.168.1.115] (mnch-5d8774be.pool.mediaWays.net. [93.135.116.190]) by mx.google.com with ESMTPSA id ev4sm395300wib.1.2014.02.11.12.23.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 12:23:47 -0800 (PST) Message-ID: <52FA86C1.8000106@googlemail.com> Date: Tue, 11 Feb 2014 21:23:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Rowan Collins CC: PHP Developers Mailing List 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> <52FA82DD.9030909@gmail.com> In-Reply-To: <52FA82DD.9030909@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [VOTE] __debugInfo() From: cryptocompress@googlemail.com (Crypto Compress) Am 11.02.2014 21:06, schrieb 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) ) Yes! I'm convinced this hook is a very useful extension for poor man's debugger. Would like to see status quo enhanced, not replaced. > > 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.) > Yes again! Got headache thinking of userland devs get this power without a way to bypass it.