Abstract class

This function does something.

"; } abstract public function getArea(); } class Rectangle extends Polygon { public function getArea() { $this->area = $this->base * $this->height; return $this->area; } function __construct($a, $b) { $this->base = $a; $this->height = $b; } } $rectangle = new Rectangle(4, 6); echo $rectangle->getArea(); ?>