In this PHP tutorial we will learn how to list methods of the class. We will also create one example to list all the methods/functions of the given class in PHP.
In this PHP tutorial we will learn how to list methods of the class. We will also create one example to list all the methods/functions of the given class in PHP.
<?php
class myclass{
function aa(){}
function bb(){}
function cc(){}
}
$ar1=get_class_methods("myclass");
foreach ($ar1 as $a1)
{
echo "<br> class--> ".$a1;
}
?>
class--> aa class--> bb class--> cc