getCapabilities(); $requiredTypes = ['string', 'integer', 'double', 'boolean', 'NULL', 'array', 'object']; $types = $capabilities->getSupportedDatatypes(); foreach ($requiredTypes as $type) { // 'object' => 'object' is OK // 'integer' => 'string' is not (redis) // 'integer' => 'integer' is not (memcache) if (! (isset($types[$type]) && in_array($types[$type], [true, 'array', 'object'], true))) { return true; } } return false; } }