Here are two way to initialize class variables.
class Test { private $var1; private $var2; public function Test($var1,$var1) {
If those variables are necessary for the operation of the class, you would beter use the first method. That way you can ensure they are set when the class is created.