That's fine but it's worth noting that, once myClass has been
instantiated, any changes to $myvar in the global scope will not be
reflected in the member variable of the object. This can be changed by
changing:
$this -> mystr = $myvar;
in the constructor to:
$this->mystr =& $myvar;
I think that should work -- although I didn't test it.