class PHP
Same name in this branch
- 11.1.x vendor/phpunit/php-code-coverage/src/Report/PHP.php \SebastianBergmann\CodeCoverage\Report\PHP
- 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Value/Php.php \PHPUnit\TextUI\Configuration\Php
- 11.1.x vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/CodeCoverage/Report/Php.php \PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Report\Php
- 11.1.x vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php \PHP_CodeSniffer\Tokenizers\PHP
- 11.1.x core/lib/Drupal/Component/Uuid/Php.php \Drupal\Component\Uuid\Php
@psalm-immutable
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Event\Runtime\PHP
Expanded class hierarchy of PHP
63 string references to 'PHP'
- AnnotatedClassDiscovery::getDefinitions in core/
lib/ Drupal/ Component/ Annotation/ Plugin/ Discovery/ AnnotatedClassDiscovery.php - Gets the definition of all plugins for this type.
- AnnotatedClassDiscoveryAutomatedProviders::getDefinitions in core/
modules/ migrate/ src/ Plugin/ Discovery/ AnnotatedClassDiscoveryAutomatedProviders.php - Gets the definition of all plugins for this type.
- ArrayLoader::configureObject in vendor/
composer/ composer/ src/ Composer/ Package/ Loader/ ArrayLoader.php - AttributeClassDiscovery::getDefinitions in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php - Gets the definition of all plugins for this type.
- AttributeFileLoader::supports in vendor/
symfony/ routing/ Loader/ AttributeFileLoader.php
File
-
vendor/
phpunit/ phpunit/ src/ Event/ Value/ Runtime/ PHP.php, line 28
Namespace
PHPUnit\Event\RuntimeView source
final class PHP {
private readonly string $version;
private readonly int $versionId;
private readonly int $majorVersion;
private readonly int $minorVersion;
private readonly int $releaseVersion;
private readonly string $extraVersion;
private readonly string $sapi;
/**
* @psalm-var list<string>
*/
private readonly array $extensions;
public function __construct() {
$this->version = PHP_VERSION;
$this->versionId = PHP_VERSION_ID;
$this->majorVersion = PHP_MAJOR_VERSION;
$this->minorVersion = PHP_MINOR_VERSION;
$this->releaseVersion = PHP_RELEASE_VERSION;
$this->extraVersion = PHP_EXTRA_VERSION;
$this->sapi = PHP_SAPI;
$extensions = array_merge(get_loaded_extensions(true), get_loaded_extensions());
sort($extensions);
$this->extensions = $extensions;
}
public function version() : string {
return $this->version;
}
public function sapi() : string {
return $this->sapi;
}
public function majorVersion() : int {
return $this->majorVersion;
}
public function minorVersion() : int {
return $this->minorVersion;
}
public function releaseVersion() : int {
return $this->releaseVersion;
}
public function extraVersion() : string {
return $this->extraVersion;
}
public function versionId() : int {
return $this->versionId;
}
/**
* @psalm-return list<string>
*/
public function extensions() : array {
return $this->extensions;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
PHP::$extensions | private | property | @psalm-var list<string> |
PHP::$extraVersion | private | property | |
PHP::$majorVersion | private | property | |
PHP::$minorVersion | private | property | |
PHP::$releaseVersion | private | property | |
PHP::$sapi | private | property | |
PHP::$version | private | property | |
PHP::$versionId | private | property | |
PHP::extensions | public | function | @psalm-return list<string> |
PHP::extraVersion | public | function | |
PHP::majorVersion | public | function | |
PHP::minorVersion | public | function | |
PHP::releaseVersion | public | function | |
PHP::sapi | public | function | |
PHP::version | public | function | |
PHP::versionId | public | function | |
PHP::__construct | public | function |