Re: protected/private access and var_dump/print_r
| From: | Christian Schneider | Date: | Tue, 18 May 2004 09:42:02 +0000 |
| Subject: | Re: protected/private access and var_dump/print_r | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9931@lists.php.net to get a copy of this message | ||
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).I agree with Derick and Andrey in that if anything should be changed it is var_dump. Reasoning: PPP is there to specify an interface, not to be used in a sandbox way. Both var_dump and print_r are for human inspection and I don't an advantage in hiding information there, quite the opposite. - Chris