seria algo...
Código PHP:
Ver originalclass Operaciones{
var $numero1;
var $numero2;
function Operaciones($a,$b){
$this->numero1=$a;
$this->numero2=$b;
}
funtion suma(){
return ($this->a+$this->b);
}
funtion resta(){
return $this->a-$this->b;
}
funtion division(){
return $this->a/$this->b;
}
funtion multiplica(){
return $this->a*$this->b;
}
funtion resultado(){
$this->suma;
$this->resta;
$this->division;
$this->multiplica;
}
}
Código PHP:
Ver original$operar = new Operaciones(2,2);
$operar -> resultado();
echo $operar;
Si esque eso es lo que necesitabas :P