Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9928 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48098 invoked by uid 1010); 18 May 2004 08:03:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47886 invoked from network); 18 May 2004 08:03:11 -0000 Received: from unknown (HELO iko.gotobg.net) (80.168.8.116) by pb1.pair.com with SMTP; 18 May 2004 08:03:11 -0000 Received: from pd9e61b57.dip.t-dialin.net ([217.230.27.87] helo=hristov.com) by iko.gotobg.net with asmtp (Exim 4.24) id 1BPzZB-0004I1-Bk; Tue, 18 May 2004 11:03:13 +0300 Message-ID: <40A9C2C8.3050508@hristov.com> Date: Tue, 18 May 2004 10:01:12 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20031230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sara Golemon CC: internals@lists.php.net References: <20040518040006.36155.qmail@pb1.pair.com> In-Reply-To: <20040518040006.36155.qmail@pb1.pair.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com Subject: Re: [PHP-DEV] protected/private access and var_dump/print_r From: php@hristov.com (Andrey Hristov) Sara Golemon wrote: > var_dump($someobject); shows only public properties (as I'd expect), but > print_r($someobject) shows all properties (explicitly identifying > protected/private props). > > Am I wrong in thinking that's not right? > > -Sara > print_r relies on a engine's routine while var_dump() does not. I had a patch to enable var_dump do dump also the protected/private stuff (since I am var_dump() not a print_r() fan). AFAIR Andrei was pro for var_dump() being consistent with print_r(). http://www.hristov.com/andrey/projects/php_stuff/patches/var_dump.diff The patch is from August last year. AFAIR it does what's expected :) Andrey