name = $name; $this->phone = $phone; } public function validate(): bool { if (empty($this->name) || strlen($this->name) > 20 || strlen($this->name) < 2) { return false; } if (empty($this->phone) || strlen($this->phone) < 7 || strlen($this->phone) > 15) { return false; } return true; } public function send() { echo 'Name: ' . $this->name; echo '
'; echo 'Phone: ' . $this->phone; } }