class Rect { public int|float $x, $y, $w, $h; public function area(): int|float { return $this->w * $this->h; } }