Ciao,
credo che quello che stai cercando sia la Reflection API che fa parte della SPL (Standard Php Library).
CiaoCodice PHP:
class operazioni
{
public function somma($a,$b)
{
return $a+$b;
}
}
$class = new ReflectionClass('operazioni');
foreach ($class->getMethods() as $method) {
/* @var $method ReflectionMethod */
echo $method->getName();
foreach ($method->getParameters() as $param) {
/* @var $param ReflectionMethod */
echo $param->getName();
}
}
![]()
Massimiliano