Skip to content

Commit 13ba743

Browse files
committed
Improve phpinfo information
- display libmemcached-awesome when used (since 1.1.1) - display both builtime and runtime versions when different
1 parent 058e9f5 commit 13ba743

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
@@ -4300,7 +4300,22 @@ PHP_MINFO_FUNCTION(memcached)
43004300
php_info_print_table_start();
43014301
php_info_print_table_header(2, "memcached support", "enabled");
43024302
php_info_print_table_row(2, "Version", PHP_MEMCACHED_VERSION);
4303-
php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
4303+
4304+
#ifdef LIBMEMCACHED_AWESOME
4305+
if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
4306+
php_info_print_table_row(2, "libmemcached-awesome headers version", LIBMEMCACHED_VERSION_STRING);
4307+
php_info_print_table_row(2, "libmemcached-awesome library version", memcached_lib_version());
4308+
} else {
4309+
php_info_print_table_row(2, "libmemcached-awesome version", memcached_lib_version());
4310+
}
4311+
#else
4312+
if (strcmp(LIBMEMCACHED_VERSION_STRING, memcached_lib_version())) {
4313+
php_info_print_table_row(2, "libmemcached headers version", LIBMEMCACHED_VERSION_STRING);
4314+
php_info_print_table_row(2, "libmemcached library version", memcached_lib_version());
4315+
} else {
4316+
php_info_print_table_row(2, "libmemcached version", memcached_lib_version());
4317+
}
4318+
#endif
43044319

43054320
#ifdef HAVE_MEMCACHED_SASL
43064321
php_info_print_table_row(2, "SASL support", "yes");

0 commit comments

Comments
 (0)