Pretty slick. It doesn't really answer the question, but it might be what he wanted.
The question was "Can you add a variable to a class?". I dont think you can. Your example implicitly declares a new variable associated with one object instantiated from the class; but no other objects of that class will have the new variable, will they? So the class was not changed, just one object.
My first thought was to have an array inside the class, and add key=>value pairs as needed. At least you could write some class methods that could use the array. I can't see that $fo->var3 provides much to the class, but maybe Im missing something.