Home > Archive > PHP Documentation > January 2006 > 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 |
print_r, var_dump and private properties in PHP5
|
|
| Florian Anderiasch 2006-01-24, 6:57 pm |
| Hello there,
http://us3.php.net/manual/en/function.print-r.php states:
print_r() and var_export() will also show protected and private
properties of objects with PHP 5.
The German translation goes even a bit further and says:
print_r() und var_export() zeigen mit PHP 5 auch private und geschützte
Eigenschaften von Objekten an, im Gegensatz zur Funktion var_dump().
( last sentence =unlike the function var_dump())
http://us3.php.net/manual/de/function.print-r.php
Is this a documentation "bug" (as it implies that var_dump should not
put out all private properties) or is this a bug in var_dump()?
And is there then a method to dump only public properties in PHP5?
Greetings,
Florian
| |
|
|
|
|
|