Home > Archive > PHP Documentation > January 2006 > Re: [PHP-DOC] Re: print_r, var_dump and private properties in PHP5
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PHP-DOC] Re: print_r, var_dump and private properties in PHP5
|
|
| Florian Anderiasch 2006-01-24, 6:57 pm |
| Hello Mark,
> http://cvs.php.net/viewcvs.cgi/phpd...-r.xml?view=log
> see the comment to revision 1.10
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....
And the question remains if there is a way to dump only public
properties and if not, why so? :)
Greetings,
Florian
| |
| Mark Wiesemann 2006-01-24, 6:57 pm |
| Hi Florian,
Florian Anderiasch wrote:
> thanks for your reply, but imho that doesn't really answer my question.
> It was changed from
> to
>
> 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:
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.
[color=darkred]
> 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
| |
| Mark Wiesemann 2006-01-26, 7:55 am |
| Mark Wiesemann wrote:
> 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.
Just FYI: I've just added var_dump() there.
Regards,
Mark
|
|
|
|
|