Suppose I have the class:
class MyClass {
protected $protected;
private $_private;
public function __get($name) {
return $this->{$name};
}
}
I want to “magically” get protected variables but not private variables. Is there a built-in PHP function that will help me identify the visibility of a class variable?
1 Answer