pole = $this->a * $this->b; } public function obwod() { return 2*($this->a + $this->b); } } $p1 = new figura; $p1->a=4; $p1->b=5; $p1->oblicz(); echo $p1->pole.'
'; echo $p1->obwod(); ?>