function devel_is_compatible_optimizer in Devel 6
Same name and namespace in other branches
- 5 devel.module \devel_is_compatible_optimizer()
- 7 devel.module \devel_is_compatible_optimizer()
1 call to devel_is_compatible_optimizer()
File
- ./
devel.module, line 1034
Code
function devel_is_compatible_optimizer() {
ob_start();
phpinfo();
$info = ob_get_contents();
ob_end_clean();
// Match the Zend Optimezer version in the phpinfo information
$found = preg_match('/Zend Optimizer v([0-9])\\.([0-9])\\.([0-9])/', $info, $matches);
if ($matches) {
$major = $matches[1];
$minor = $matches[2];
$build = $matches[3];
if ($major >= 3) {
if ($minor >= 3) {
return TRUE;
}
elseif ($minor == 2 && $build >= 8) {
return TRUE;
}
else {
return FALSE;
}
}
else {
return FALSE;
}
}
else {
return TRUE;
}
}