Returns the name of the class that is used to create the object passed to the
get_class
function
class User {
    public $username;
    public $friends;
    
    public function addFriend($friend_name) {
        $this->friends[] = $friend_name;
    }
}
$user1 = new User();
echo get_class($user1);
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