Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Version.php

function Version::getVersionString

Same name in this branch
  1. 11.1.x vendor/phpunit/phpunit/src/Runner/Version.php \PHPUnit\Runner\Version::getVersionString()
1 call to Version::getVersionString()
Version::equals in vendor/phar-io/version/src/Version.php

File

vendor/phar-io/version/src/Version.php, line 51

Class

Version

Namespace

PharIo\Version

Code

public function getVersionString() : string {
    $str = \sprintf('%d.%d.%d', $this->getMajor()
        ->getValue() ?? 0, $this->getMinor()
        ->getValue() ?? 0, $this->getPatch()
        ->getValue() ?? 0);
    if (!$this->hasPreReleaseSuffix()) {
        return $str;
    }
    return $str . '-' . $this->getPreReleaseSuffix()
        ->asString();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal