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

Breadcrumb

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

function PhpVersion::getHostVersion

Get the host PHP version, that is the PHP version we're currently running on.

3 calls to PhpVersion::getHostVersion()
Emulative::__construct in vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
ParserFactory::createForHostVersion in vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php
Create a parser targeting the host PHP version, that is the PHP version we're currently running on. This parser will not use any token emulation.
PhpVersion::isHostVersion in vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php
Check whether this is the host PHP version.

File

vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php, line 52

Class

PhpVersion
A PHP version, representing only the major and minor version components.

Namespace

PhpParser

Code

public static function getHostVersion() : self {
    return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION);
}

API Navigation

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