print_r(get_class_methods(Student));
will get me a list of the methods in the Student class (all of which are public), but
print_r(get_class_vars(Student));
prints nothing. Is it because all my class variables are marked private?
Yes. As per the [man]get_class_vars/man page:
Return Values Returns an associative array of default public properties of the class.
Return Values
Returns an associative array of default public properties of the class.
I read about get_class_vars() in a book that listed it and its cousins together with a short description of each. The book's description didn't mention public. In the future, I'll try to remember to check something out at http://www.php.net/ before posting.
I'm often amazed at the missing and sometimes outright wrong info that gets published in programming books. But then again, there is so much info to be digested with something the size and complexity of PHP, maybe I shouldn't be. I've just started reading PHP 5 Objects, Patterns, and Practice by Matt Zandstra, and so far it seems to be a pretty well-written book, though I'm just getting to the end of the introductory material at this point.
It also depends on the part of the book you read. I was reading a summary of the related functions. Elsewhere in the book, it might have been treated in greater detail.