Esempio n. 1
0
 public static function getPHPExtensionDirectory()
 {
     $phpinfo = \Webinterface\Helper\PHPInfo::getPHPInfo(true);
     $extensionDir = '';
     if (preg_match('/extension_dir([ =>\\t]*)([^ =>\\t]+)/', $phpinfo, $matches)) {
         $extensionDir = $matches[2];
     }
     return $extensionDir;
 }
Esempio n. 2
0
 public static function getXDebugExtensionType()
 {
     $phpinfo = \Webinterface\Helper\PHPInfo::getPHPInfo(true);
     // Check phpinfo content for Xdebug as Zend Extension
     if (preg_match('/with\\sXdebug\\sv([0-9.rcdevalphabeta-]+),/', $phpinfo, $matches)) {
         return 'Zend Extension';
     }
     // Check phpinfo content for Xdebug as normal PHP extension
     if (preg_match('/xdebug support/', $phpinfo, $matches)) {
         return 'PHP Extension';
     }
     return ':( XDebug not loaded.';
 }