class User {
public $username;
public $friends;
public function addFriend($friend_name) {
$this->friends[] = $friend_name;
}
}
$user1 = new User();
print_r( get_class_vars('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