The general idea of private members is that they are blocked from being accessed from outside.
If you have access to the class, you can write a __get
method which will help you (but if you have the access you can also make them public).
Some workaround is to "catch" the output of print_r
, var_export
or var_dump
functions and then parse it, so you would get what you need.