hExists

PHP Redis

hExists

Description

Verify if the specified member exists in a key.

验证HASH表中是否存在指定的KEY-VALUE

Parameters

key
memberKey

Return value

BOOL: If the member exists in the hash table, return TRUE, otherwise return FALSE.

Examples
$redis->hSet('h', 'a', 'x');
$redis->hExists('h', 'a'); /*  TRUE */
$redis->hExists('h', 'NonExistingKey'); /* FALSE */