Hi. I was wondering if anybody knows how to find if a class property is public, private or protected say via a function from within the class?
For instance if I did this:
class SomeClass
{
public $someProperty = 'whatever';
private $anotherProperty = 'whatever again';
public doingStuff()
{
print(visibility('someProperty'));
}
}
$someObject = new SomeClass();
someObject->doingStuff();
// Would print: public
Thank-you.