JBZoo\Utils\Sys::hasXdebug PHP Method

hasXdebug() public static method

Returns true when the runtime used is PHP and Xdebug is loaded.
public static hasXdebug ( ) : boolean
return boolean
    public static function hasXdebug()
    {
        return (self::isRealPHP() || self::isHHVM()) && extension_loaded('xdebug');
    }

Usage Example

Example #1
0
 public function testNestedIndexCoverage()
 {
     $uniq = uniqid();
     $result = httpRequest('http://localhost:8888/folder/not-index.php', array('test' => $uniq));
     isSame('folder/not-index: ' . $uniq, $result->getBody());
     isSame(200, $result->getCode());
     if (Sys::hasXdebug() && !Sys::isPHP7()) {
         isDir(PROJECT_BUILD . '/coverage_cov');
         isDir(PROJECT_BUILD . '/coverage_html');
         isDir(PROJECT_BUILD . '/coverage_xml');
     }
 }
All Usage Examples Of JBZoo\Utils\Sys::hasXdebug