<?php

global $wp_object_cache;
$info = array();
$dropin = $this->validate_object_cache_dropin();
$info['Status'] = $this->get_status();
$info['Client'] = $this->get_redis_client_name();
$info['Drop-in'] = $dropin ? 'Valid' : 'Invalid';
if ($dropin) {
    try {
        $cache = new WP_Object_Cache(false);
        $info['Ping'] = $cache->redis_instance()->ping();
    } catch (Exception $exception) {
        $info['Connection Exception'] = sprintf('%s (%s)', $exception->getMessage(), get_class($exception));
    }
}
$info['Redis Extension'] = class_exists('Redis') ? phpversion('redis') : 'Not Found';
$info['Predis Client'] = class_exists('Predis\\Client') ? Predis\Client::VERSION : 'Not Found';
if (defined('PHP_VERSION')) {
    $info['PHP Version'] = PHP_VERSION;
}
if (defined('HHVM_VERSION')) {
    $info['HHVM Version'] = HHVM_VERSION;
}
$info['Multisite'] = is_multisite() ? 'Yes' : 'No';
if ($dropin) {
    $info['Global Prefix'] = json_encode($wp_object_cache->global_prefix);
    $info['Blog Prefix'] = json_encode($wp_object_cache->blog_prefix);
}
$constants = array('WP_REDIS_DISABLED', 'WP_REDIS_CLIENT', 'WP_REDIS_SCHEME', 'WP_REDIS_HOST', 'WP_REDIS_PORT', 'WP_REDIS_PATH', 'WP_REDIS_DATABASE', 'WP_REDIS_SERVERS', 'WP_REDIS_CLUSTER', 'WP_REDIS_MAXTTL', 'WP_REDIS_GLOBAL_GROUPS', 'WP_REDIS_IGNORED_GROUPS', 'WP_CACHE_KEY_SALT');
foreach ($constants as $constant) {