Runtime
in package
Utility class for HHVM/PHP environment handling.
Table of Contents
Properties
- $binary : string
Methods
- 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
booldiscardsComments()
Returns true when Zend OPcache is loaded, enabled, and is configured to discard comments.
public
discardsComments() : bool
Return values
boolgetBinary()
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
stringgetCurrentSettings()
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
stringgetNameWithVersion()
public
getNameWithVersion() : string
Return values
stringgetNameWithVersionAndCodeCoverageDriver()
public
getNameWithVersionAndCodeCoverageDriver() : string
Return values
stringgetVendorUrl()
public
getVendorUrl() : string
Return values
stringgetVersion()
public
getVersion() : string
Return values
stringhasPCOV()
Returns true when the runtime used is PHP with PCOV loaded and enabled.
public
hasPCOV() : bool
Return values
boolhasPHPDBGCodeCoverage()
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
boolhasXdebug()
Returns true when the runtime used is PHP and Xdebug is loaded.
public
hasXdebug() : bool
Return values
boolisHHVM()
Returns true when the runtime used is HHVM.
public
isHHVM() : bool
Return values
boolisPHP()
Returns true when the runtime used is PHP without the PHPDBG SAPI.
public
isPHP() : bool
Return values
boolisPHPDBG()
Returns true when the runtime used is PHP with the PHPDBG SAPI.
public
isPHPDBG() : bool
Return values
boolperformsJustInTimeCompilation()
Returns true when Zend OPcache is loaded, enabled, and is configured to perform just-in-time compilation.
public
performsJustInTimeCompilation() : bool
Return values
boolisOpcacheActive()
private
isOpcacheActive() : bool