class test{
private $width;
private $height;
private $length;
public function __construct($L,$W,$H){
$this->length=$L;
$this->height=$H;
$this->width=$W;
}
public function volume(){
return "the class name ".__CLASS__." ".
$this->height*$this->length*$this->width;
}
}
$T=new test(10,10,5);
echo $T->volume();
private $width;
private $height;
private $length;
public function __construct($L,$W,$H){
$this->length=$L;
$this->height=$H;
$this->width=$W;
}
public function volume(){
return "the class name ".__CLASS__." ".
$this->height*$this->length*$this->width;
}
}
$T=new test(10,10,5);
echo $T->volume();