/** * Get string representation * * @return string **/ public function __toString() { if ($this->getMajor() > 0 || $this->getMinor() > 0 || $this->getPatch() > 0) { return parent::__toString(); } return $this->getGreek() . '.' . $this->getReleaseNumber(); }