Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9943 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35699 invoked by uid 1010); 18 May 2004 14:31:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34913 invoked by uid 1007); 18 May 2004 14:31:20 -0000 Message-ID: <20040518143120.34847.qmail@pb1.pair.com> To: internals@lists.php.net References: <20040518040006.36155.qmail@pb1.pair.com> Date: Tue, 18 May 2004 07:32:27 -0700 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Posted-By: 64.142.6.231 Subject: Re: protected/private access and var_dump/print_r From: pollita@php.net ("Sara Golemon") > var_dump($someobject); shows only public properties (as I'd expect), but > print_r($someobject) shows all properties (explicitly identifying > protected/private props). > So, to sum up the responses to the above question: 1) It's okay for print_r/var_dump to expose public/protected members (their access rights apply to the program, not the person) 2) print_r() shouldn't change a thing. 3) var_dump() *may* deserve a change to allow it to show private/protected props (There's an objection to this because....?...) Further would this qualify as a bugfix or more of a feature change? The next question that brings up then is in relation to bug#27798: I would think that get_object_vars() should expose private/protected props when called from within the class itself (as appropriate based on inheretance of course). Is this assumption true? -Sara