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