Documentation

Runtime
in package

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

private static string $binary

Methods

canCollectCodeCoverage()

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

public canCollectCodeCoverage() : bool
Return values
bool —

discardsComments()

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

public discardsComments() : bool
Return values
bool —

getBinary()

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()

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()

public getName() : string
Return values
string —

getNameWithVersion()

public getNameWithVersion() : string
Return values
string —

getNameWithVersionAndCodeCoverageDriver()

public getNameWithVersionAndCodeCoverageDriver() : string
Return values
string —

getVendorUrl()

public getVendorUrl() : string
Return values
string —

getVersion()

public getVersion() : string
Return values
string —

hasPCOV()

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

public hasPCOV() : bool
Return values
bool —

hasPHPDBGCodeCoverage()

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()

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

public hasXdebug() : bool
Return values
bool —

isHHVM()

Returns true when the runtime used is HHVM.

public isHHVM() : bool
Return values
bool —

isPHP()

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

public isPHP() : bool
Return values
bool —

isPHPDBG()

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

public isPHPDBG() : bool
Return values
bool —

performsJustInTimeCompilation()

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

public performsJustInTimeCompilation() : bool
Return values
bool —

isOpcacheActive()

private isOpcacheActive() : bool
Return values
bool —

Search results