I want to check if a local variable in a class is public or private. The reason is to create a function like this:
function ToArray() { $arr = array(); forea
To get a list of all public attributes call get_object_vars().
get_object_vars()
(Hint: calling it by the object itself will return all attributes.)