2018-12-11 15:48:50 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$extension = isset($argv[1]) ? trim($argv[1]) : '';
|
2019-09-27 17:29:02 +02:00
|
|
|
$rc = 1;
|
2018-12-11 15:48:50 +01:00
|
|
|
|
|
|
|
if ($extension === '') {
|
|
|
|
fprintf(STDERR, "Missing module handle.\n");
|
2019-09-27 17:29:02 +02:00
|
|
|
} else {
|
|
|
|
$nameMap = array(
|
|
|
|
'opcache' => 'Zend OPcache',
|
|
|
|
);
|
|
|
|
$extensionLowerCase = strtolower($extension);
|
|
|
|
if (isset($nameMap[$extensionLowerCase])) {
|
|
|
|
$extension = $nameMap[$extensionLowerCase];
|
|
|
|
}
|
|
|
|
if (!extension_loaded($extension)) {
|
|
|
|
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
|
|
|
|
} else {
|
|
|
|
fprintf(STDOUT, sprintf("Extension correctly loaded: %s\n", $extension));
|
|
|
|
$rc = 0;
|
|
|
|
}
|
2018-12-11 15:48:50 +01:00
|
|
|
}
|
|
|
|
|
2019-09-27 17:29:02 +02:00
|
|
|
exit($rc);
|