Menu

## Runtime
in package

Runtime.php : 36

Utility class for HHVM/PHP environment handling.

### Table of Contents

$binary : string
canCollectCodeCoverage() : bool
  Returns true when Xdebug or PCOV is available or the runtime used is PHPDBG.
discardsComments() : bool
  Returns true when Zend OPcache is loaded, enabled, and is configured to discard comments.
getBinary() : string
  Returns the path to the binary of the current runtime.
getCurrentSettings() : array<string|int, string>
  Parses the loaded php.ini file (if any) as well as all additional php.ini files from the additional ini dir for a list of all configuration settings loaded from files at startup. Then checks for each php.ini setting passed via the `$values` parameter whether this setting has been changed at runtime. Returns an array of strings where each string has the format `key=value` denoting the name of a changed php.ini setting with its new value.
getName() : string
getNameWithVersion() : string
getNameWithVersionAndCodeCoverageDriver() : string
getVendorUrl() : string
getVersion() : string
hasPCOV() : bool
  Returns true when the runtime used is PHP with PCOV loaded and enabled.
hasPHPDBGCodeCoverage() : bool
  Returns true when the runtime used is PHP with the PHPDBG SAPI and the phpdbg_*_oplog() functions are available (PHP >= 7.0).
hasXdebug() : bool
  Returns true when the runtime used is PHP and Xdebug is loaded.
isHHVM() : bool
  Returns true when the runtime used is HHVM.
isPHP() : bool
  Returns true when the runtime used is PHP without the PHPDBG SAPI.
isPHPDBG() : bool
  Returns true when the runtime used is PHP with the PHPDBG SAPI.
performsJustInTimeCompilation() : bool
  Returns true when Zend OPcache is loaded, enabled, and is configured to perform just-in-time compilation.
isOpcacheActive() : bool

### Properties

#### $binary

Runtime.php : 41
`private static string $binary`

### Methods

#### canCollectCodeCoverage()

Runtime.php : 47

Returns true when Xdebug or PCOV is available or the runtime used is PHPDBG.

`public canCollectCodeCoverage() : bool`

##### Return values

bool —

#### discardsComments()

Runtime.php : 56

Returns true when Zend OPcache is loaded, enabled, and is configured to discard comments.

`public discardsComments() : bool`

##### Return values

bool —

#### getBinary()

Runtime.php : 94

Returns the path to the binary of the current runtime.

`public getBinary() : string`

Appends ' --php' to the path when the runtime is HHVM.

##### Return values

string —

#### getCurrentSettings()

Runtime.php : 267

Parses the loaded php.ini file (if any) as well as all additional php.ini files from the additional ini dir for a list of all configuration settings loaded from files at startup. Then checks for each php.ini setting passed via the `$values` parameter whether this setting has been changed at runtime. Returns an array of strings where each string has the format `key=value` denoting the name of a changed php.ini setting with its new value.

`public getCurrentSettings(array<string|int, mixed> $values) : array<string|int, string>`

##### Parameters

$values : array<string|int, mixed>

##### Return values

array<string|int, string> —

#### getName()

Runtime.php : 167
`public getName() : string`

##### Return values

string —

#### getNameWithVersion()

Runtime.php : 139
`public getNameWithVersion() : string`

##### Return values

string —

#### getNameWithVersionAndCodeCoverageDriver()

Runtime.php : 144
`public getNameWithVersionAndCodeCoverageDriver() : string`

##### Return values

string —

#### getVendorUrl()

Runtime.php : 184
`public getVendorUrl() : string`

##### Return values

string —

#### getVersion()

Runtime.php : 195
`public getVersion() : string`

##### Return values

string —

#### hasPCOV()

Runtime.php : 250

Returns true when the runtime used is PHP with PCOV loaded and enabled.

`public hasPCOV() : bool`

##### Return values

bool —

#### hasPHPDBGCodeCoverage()

Runtime.php : 242

Returns true when the runtime used is PHP with the PHPDBG SAPI and the phpdbg_*_oplog() functions are available (PHP >= 7.0).

`public hasPHPDBGCodeCoverage() : bool`

##### Return values

bool —

#### hasXdebug()

Runtime.php : 209

Returns true when the runtime used is PHP and Xdebug is loaded.

`public hasXdebug() : bool`

##### Return values

bool —

#### isHHVM()

Runtime.php : 217

Returns true when the runtime used is HHVM.

`public isHHVM() : bool`

##### Return values

bool —

#### isPHP()

Runtime.php : 225

Returns true when the runtime used is PHP without the PHPDBG SAPI.

`public isPHP() : bool`

##### Return values

bool —

#### isPHPDBG()

Runtime.php : 233

Returns true when the runtime used is PHP with the PHPDBG SAPI.

`public isPHPDBG() : bool`

##### Return values

bool —

#### performsJustInTimeCompilation()

Runtime.php : 73

Returns true when Zend OPcache is loaded, enabled, and is configured to perform just-in-time compilation.

`public performsJustInTimeCompilation() : bool`

##### Return values

bool —

#### isOpcacheActive()

Runtime.php : 301
`private isOpcacheActive() : bool`

##### Return values

bool —

## Search results