Ok so I have this code:

PHP Code:

class main{

function 
one(){
echo 
'something';
}

}

class 
second extends main{

function 
two(){
echo 
'something else';
}

}

$var = new main
Now when I am calling two() like this:

PHP Code:

$var
->two(); 
It doesn't work. Is there a way to make it work like the way I have in my code? Because there is more then 1 extended class and I want to be able to use the same variable for everything thats in all extended classes.

Thanks.