class Test
{
public $pr = "Property from class Test";
public function Test()
{
echo 'Constructor activated from class Test <br />';
}
public function __destruct()
{
echo '<br /> Destructor activated from class Test <br />';
}
public function setProperty($val)
{
$this->pr = $val;
}
public function getProperty()
{
return $this->pr;
}
public function f1()
{
echo '<br /> f1() <br />';
}
public function f2()
{
echo '<br /> f2() <br />';
}
}
$class_methods = get_class_methods('Test');
foreach ($class_methods as $method_name)
echo "Method: $method_name <br />";
/*
run:
Method: Test
Method: __destruct
Method: setProperty
Method: getProperty
Method: f1
Method: f2
*/