Returns a list of methods of the class being passed to the function
class User {
    public $username = 'George';
    public $friends = ['Tom','David'];
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User();

print_r( get_class_methods('User') );
by Valeri Tandilashvili
4 years ago
PHP
OOP
Object Oriented PHP Tutorial
1
Pro tip: use ```triple backticks around text``` to write in code fences