MongooseA living laboratory of myriad worlds.

All help topics · Link to this topic

Showing help on 'maphaskey()'

Syntax: maphaskey (MAP <map>, ANY <key> [, INT <case-matters>]) => INT

Returns 1 if <key> exists in <map>. If <case-matters> is true, string-key comparison is case-sensitive. Collection values cannot be used as keys for this lookup; if <key> is a list, map, or other collection value, E_TYPE is raised. When not dealing with hundreds of keys, this function is faster (and easier to read) than something like: !(x in mapkeys(map))