Re: Re: print_r, var_dump and private properties in PHP5
| From: | Mark Wiesemann | Date: | Tue, 24 Jan 2006 22:41:35 +0000 |
| Subject: | Re: Re: print_r, var_dump and private properties in PHP5 | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969371735@lists.php.net to get a copy of this message | ||
Hi Florian,
Florian Anderiasch wrote:
> thanks for your reply, but imho that doesn't really answer my question.
> It was changed from
>> also show protected and private properties of objects with PHP 5, on
>> the contrary to <function>var_dump</function>.
> to
>> also show protected and private properties of objects with PHP 5.
>
> But, it still *implies* that var_dump() should behave in another way,
> like hide the private properties. To clarify it, there should be
> something like:
>> var_dump(), print_r() and var_export() all show the private....
Sorry, I didn't read carefully enough. But var_dump() manual page
states:
| In PHP 5 all public, private and protected properties of objects will
| be returned in the output.
Therefore, I think that Jakub forgot to add var_dump() when he removed
", on the contrary to <function>var_dump</function>" from print_r()
documentation.
> And the question remains if there is a way to dump only public
> properties and if not, why so? :)
I can't help here, sorry.
Regards,
Mark