get_class_methods : Reflection Class Methods « Class « PHP






get_class_methods

<?php
class Person {
    private $name;    
    private $age;    
    private $id;    

    function __construct( $name, $age ) {
        $this->name = $name;
        $this->age = $age;
    }

    function setId( $id ) {
        $this->id = $id;
    }
    
    function __clone() {
        $this->id = 0;
    }
}

print_r( get_class_methods( 'Person' ) );

 
?>


           
       








Related examples in the same category

1.is_callable: is method callable
2.in_array
3.Call class method dynamically
4.method_exists
5.Get Class method: file name, start line and end line
6.Class method info: is static, is final, is constructor, return references
7.Class method info: is User Defined, is Internal, is Abstract
8.Class method info: is private, is public, is protected