public static function LessAutoprefixer::version in Less CSS Preprocessor 7.4
Same name and namespace in other branches
- 8 classes/class.lessautoprefixer.inc \LessAutoprefixer::version()
Returns the version string from command line Autoprefixer.
Return value
string|null Version string from Autoprefixer, or null if no version found.
File
- classes/
class.lessautoprefixer.inc, line 47 - Contains 'LessAutoprefixer' class; an abstraction layer for command line Autoprefixer.
Class
- LessAutoprefixer
- 'Autoprefixer' class.
Code
public static function version() {
$version = NULL;
if (function_exists('proc_open')) {
try {
$version_response = self::create(NULL)
->proc_open(array(
'--version',
));
$version = preg_replace('/.*?([\\d\\.]+).*/', '$1', $version_response);
} catch (Exception $e) {
}
}
return $version;
}