> 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to