hash_get

March 26, 2020 Contributors

Name

hash_get — get the value associated with the specified key

Synopsis

hash_get { $hash } { $key }

Description

Get the value of the specified key from a hash. Hash keys must be strings or expressions that resolve to strings.

Sieve scripts using hash_get can be used in any phase.

**Configuration Change. ** This feature is available starting from Momentum 3.0.16.

Since 3.0.17, passing an incorrect value to this function returns an error message. Previously, no error was returned.

$hash = hash_create;
  hash_set $hash "mykey" "myvalue";
  $value = hash_get $hash "mykey";

See Also

hash_create, hash_dump and hash_get