| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]

# Method zero_type()

Method zero_type

  `int zero_type(mixed a)`

Description

  Return the type of zero.

  There are many types of zeros out there, or at least there are two. One is returned by normal functions, and one returned by mapping lookups and find_call_out() when what you looked for wasn't there. The only way to separate these two kinds of zeros is zero_type() .

Returns

  When doing a find_call_out() or mapping lookup, zero_type() on this value will return `1` if there was no such thing present in the mapping, or if no such `call_out` could be found.

  If the argument to zero_type() is a destructed object or a function in a destructed object, `2` will be returned.

  In all other cases zero_type() will return `0` (zero).

See also

  find_call_out()