diff --git a/ext/maxminddb.c b/ext/maxminddb.c index 428ec65..bd902fb 100644 --- a/ext/maxminddb.c +++ b/ext/maxminddb.c @@ -20,6 +20,7 @@ #include #include #include "Zend/zend_exceptions.h" +#include "ext/standard/info.h" #include #ifdef ZTS @@ -557,6 +558,17 @@ PHP_MINIT_FUNCTION(maxminddb){ return SUCCESS; } +static PHP_MINFO_FUNCTION(maxminddb) +{ + php_info_print_table_start(); + + php_info_print_table_row(2, "MaxMind DB Reader", "enabled"); + php_info_print_table_row(2, "maxminddb extension version", PHP_MAXMINDDB_VERSION); + php_info_print_table_row(2, "libmaxminddb library version", MMDB_lib_version()); + + php_info_print_table_end(); +} + zend_module_entry maxminddb_module_entry = { STANDARD_MODULE_HEADER, PHP_MAXMINDDB_EXTNAME, @@ -565,7 +577,7 @@ zend_module_entry maxminddb_module_entry = { NULL, NULL, NULL, - NULL, + PHP_MINFO(maxminddb), PHP_MAXMINDDB_VERSION, STANDARD_MODULE_PROPERTIES };