Search notes:

PHP code snippets: apache_get_modules

Return an array of loaded apache modules.
apache_get_modules is only available when the PHP is installed as a module. If PHP is not running as FPM or fCGI or not in an Apache environment, apache_get_modules() does not exist. Therefore, the following snippet checks for the availability of this function with function_exists.
if (function_exists('apache_get_modules')) {
  print('<p>apache_get_modules: <br>- ' . join('<br>- ', apache_get_modules()));
}
else {
   print('<p>apache_get_modules() is not defined.;');
}

See also

Other PHP snippets

Index