Skip to content

Commit d8f6f1c

Browse files
authored
Merge pull request #488 from remicollet/issue-awesome
Improve phpinfo information
2 parents 8a5ef9e + 13ba743 commit d8f6f1c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

php_memcached.c

+16-1
Original file line numberDiff line numberDiff line change
@@ -4305,7 +4305,22 @@ PHP_MINFO_FUNCTION(memcached)
43054305
php_info_print_table_start();
43064306
php_info_print_table_header(2, "memcached support", "enabled");
43074307
php_info_print_table_row(2, "Version", PHP_MEMCACHED_VERSION);
4308-
php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
4308+
4309+
#ifdef LIBMEMCACHED_AWESOME
4310+
if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
4311+
php_info_print_table_row(2, "libmemcached-awesome headers version", LIBMEMCACHED_VERSION_STRING);
4312+
php_info_print_table_row(2, "libmemcached-awesome library version", memcached_lib_version());
4313+
} else {
4314+
php_info_print_table_row(2, "libmemcached-awesome version", memcached_lib_version());
4315+
}
4316+
#else
4317+
if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
4318+
php_info_print_table_row(2, "libmemcached headers version", LIBMEMCACHED_VERSION_STRING);
4319+
php_info_print_table_row(2, "libmemcached library version", memcached_lib_version());
4320+
} else {
4321+
php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
4322+
}
4323+
#endif
43094324

43104325
#ifdef HAVE_MEMCACHED_SASL
43114326
php_info_print_table_row(2, "SASL support", "yes");

0 commit comments

Comments
 (0)