本文整理汇总了PHP中SebastianBergmann\Environment\Runtime::isHHVM方法的典型用法代码示例。如果您正苦于以下问题:PHP Runtime::isHHVM方法的具体用法?PHP Runtime::isHHVM怎么用?PHP Runtime::isHHVM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SebastianBergmann\Environment\Runtime
的用法示例。
在下文中一共展示了Runtime::isHHVM方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param PHP_CodeCoverage_Driver $driver
* @param PHP_CodeCoverage_Filter $filter
* @throws PHP_CodeCoverage_Exception
*/
public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null)
{
if ($driver === null) {
$runtime = new Runtime();
if ($runtime->isHHVM()) {
$driver = new PHP_CodeCoverage_Driver_HHVM();
} elseif ($runtime->hasXdebug()) {
$driver = new PHP_CodeCoverage_Driver_Xdebug();
} else {
throw new PHP_CodeCoverage_Exception('No code coverage driver available');
}
}
if ($filter === null) {
$filter = new PHP_CodeCoverage_Filter();
}
$this->driver = $driver;
$this->filter = $filter;
}
示例2: testCanBeDetected
/**
* @covers \SebastianBergmann\Environment\Runtime::isHHVM
*/
public function testCanBeDetected()
{
$this->assertInternalType('boolean', $this->env->isHHVM());
}
示例3: selectDriver
/**
* @return PHP_CodeCoverage_Driver
* @throws PHP_CodeCoverage_RuntimeException
*/
private function selectDriver()
{
$runtime = new Runtime();
if (!$runtime->canCollectCodeCoverage()) {
throw new PHP_CodeCoverage_RuntimeException('No code coverage driver available');
}
if ($runtime->isHHVM()) {
return new PHP_CodeCoverage_Driver_HHVM();
} elseif ($runtime->isPHPDBG()) {
return new PHP_CodeCoverage_Driver_PHPDBG();
} else {
return new PHP_CodeCoverage_Driver_Xdebug();
}
}