Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72289 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64899 invoked from network); 5 Feb 2014 20:01:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2014 20:01:16 -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.215.175 as permitted sender) X-PHP-List-Original-Sender: cryptocompress@googlemail.com X-Host-Fingerprint: 209.85.215.175 mail-ea0-f175.google.com Received: from [209.85.215.175] ([209.85.215.175:59029] helo=mail-ea0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/F4-38005-A8892F25 for ; Wed, 05 Feb 2014 15:01:15 -0500 Received: by mail-ea0-f175.google.com with SMTP id z10so465789ead.6 for ; Wed, 05 Feb 2014 12:01:11 -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:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=CO3oKbUDNnoNf6h6/TM3K55OXNujb0BFt0C+2IRV0dM=; b=CVDaWzka8JC8wL1rpS+85boy+37pVZIDDOp8KM3YOSUzGr/W0GdrEWgtgbgBseHOq4 LWxbmj7IusvmqWoFqPmTx9j0NW8xbpS2lFG+LsccOltA2VBEnFBfdisbA6u4U5k/Wzzb HLlSDlX6wC6ivAmCxw9gOUeN5xUuOQbgFx9W1WW2OF7IsoxhK+zXSTZIUEJ06a60ANji 0cfLvwWqkc4OEYkRwLaYQ7/0bXK7SQbYoOuRwq1IaxtfQSswH1NtfsYL++nB10SsqNsz OBL93RRpx3D9pJRu9Xe3A945HTtlBdthhkCAeLuuflRCAE5nqBa9gHmYFLfuzwRdY8+7 +/Ag== X-Received: by 10.14.210.130 with SMTP id u2mr1549880eeo.108.1391630471701; Wed, 05 Feb 2014 12:01:11 -0800 (PST) Received: from [192.168.1.115] (mnch-5d856266.pool.mediaWays.net. [93.133.98.102]) by mx.google.com with ESMTPSA id y47sm58272253eel.14.2014.02.05.12.01.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 12:01:10 -0800 (PST) Message-ID: <52F29880.6050304@googlemail.com> Date: Wed, 05 Feb 2014 21:01:04 +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: Sara Golemon , PHP Developers Mailing List References: <52F00437.7010903@googlemail.com> <52F005E6.6090702@googlemail.com> <52F0D36B.7010905@googlemail.com> In-Reply-To: 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 05.02.2014 19:38, schrieb Sara Golemon: > The existing get_debug_info behavior is always active and this > RFC just lifts it up to the userspace level. Is there a specific use > case for which you'd like that? I suppose you could always do: > var_dump((array)$obj); and get the "real" prop info. What info someone want to see is highly *context/situation and person dependent*. As i wrote i use __tostring extensively for this specific purpose. For 99% of the time i am happy with compact/trimmed output of importance and there is this other case (mostly urgent), to see the full state of the whole object graph (yeah, recursive too). The issue occurred is somewhat analogous with "escaping on input" or "private/protected discussion": - sanitize: information is missing on output - escape html: read garbage on command line/logs - private: can't change bad design easily (- it's not about security) Changing class definitions/methods of whole object graph is obviously not an option. Casting to array is of no help as only for current object and only for public props. Rephrased: Someone (my younger self :D) can decide what i do *not* need to see in my logs/debug-output and there would be no easy/fast way to bypass. cryptocompress