Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72484 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53813 invoked from network); 11 Feb 2014 22:53:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Feb 2014 22:53:15 -0000 Authentication-Results: pb1.pair.com header.from=cryptocompress@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cryptocompress@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.216.180 as permitted sender) X-PHP-List-Original-Sender: cryptocompress@googlemail.com X-Host-Fingerprint: 209.85.216.180 mail-qc0-f180.google.com Received: from [209.85.216.180] ([209.85.216.180:53394] helo=mail-qc0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/53-62230-AD9AAF25 for ; Tue, 11 Feb 2014 17:53:15 -0500 Received: by mail-qc0-f180.google.com with SMTP id i17so14375678qcy.11 for ; Tue, 11 Feb 2014 14:53:12 -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=MFYigTCg7N/l7CXgljhJUq/pUpwkVZcfDum0+8jHgPk=; b=vkaHj99oawKQR9fDVm5c1xU4pyvPm5fB7ohaG18b5AVEcC90Ej3EOh8r8QOBsJnOuI y96VDbuBeOAfKVe9kthQCZo8HJ+QpwDKMZRudnx1858DkSxGjR96YTqtqZbfi7rFrLrr flshv+mPvKwygyZk83ajKViS6LnO/S4EwqNEeMCpGrCM7iS1v931BFa8BS9VBOpefRUq bk5AlFfgFzVyTwj4s10SArvrXcmkb3SQkwOIKRDxcKxRWJcFmQjT10B3ZfoidgmD/7X8 RThL/iZdv0QaX2e3dsolFjipru7WPByHFPZp63ui7Ksci/Zo6G4zB3i4ZqxrB9VBjBfc n8ow== X-Received: by 10.224.49.69 with SMTP id u5mr62433162qaf.88.1392159191905; Tue, 11 Feb 2014 14:53:11 -0800 (PST) Received: from [192.168.1.115] (mnch-5d8774be.pool.mediaWays.net. [93.135.116.190]) by mx.google.com with ESMTPSA id r40sm16891527qga.23.2014.02.11.14.53.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 14:53:11 -0800 (PST) Message-ID: <52FAA9C4.2090507@googlemail.com> Date: Tue, 11 Feb 2014 23:52:52 +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: PHP Developers Mailing List CC: Derick Rethans , George Bond , Rowan Collins , =?UTF-8?B?Sm9oYW5uZXMgU2NobMO8dA==?= =?UTF-8?B?ZXI=?= , Stas Malyshev , Sara Golemon References: <52F00437.7010903@googlemail.com> <52FA71FE.8060808@googlemail.com> <1392151967.3990.11.camel@guybrush> <52FA90B3.5040205@googlemail.com> <1392153156.3990.13.camel@guybrush> <52FA99C4.5080006@googlemail.com> In-Reply-To: <52FA99C4.5080006@googlemail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [VOTE] __debugInfo() [summary] From: cryptocompress@googlemail.com (Crypto Compress) Good evening, ladies and gentlemen! Solutions to problems created by RFCs are inherent and should not be solved in followup RFCs. The __debugInfo RFC replaces one problem [1] by a subtile other one [2]. Why is it impossible to solve [1] and consequent [2] *within* this RFC? [1] way too big object dumps [2] no reliable way to create object dumps at all Thank you! cryptocompress p.s.: As most of you don't have time to read all the posts, a chronological summary: ---------- 1/3 ---------- Am 05.02.2014 21:54, schrieb Sara Golemon: > On Wed, Feb 5, 2014 at 12:11 PM, Crypto Compress > wrote: >> It's not easy nor fast to change output of a whole object graph. >> > Oh, I see what you were getting at now. Yeah, that would be onerous > if you found yourself in that position. Might be a good idea to do a > followup RFC to introduce an INI setting. I'm not keen on adding a > new method, that kind of misses the point of the original hook. > > -Sara ---------- 2/3 ---------- Am 11.02.2014 21:23, schrieb 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. ---------- 3/3 ---------- Am 11.02.2014 21:54, schrieb Stas Malyshev: > Hi! > >> Usecase #2: new maintainer >> Hunting bug in proxy object. No way to dump internals at all. Wait what? > That's exactly what would routinely happen with this proposal. People > would use __debugInfo to pretty-print their object structure, and then > discover they actually have no way to know what's *really* there when > their pretty-printer does not work or does not supply needed > information. So they would eventually ask for real_var_dump(). Thank you again!