In some instances, automatic type conversion does not occur. Some functions return values of different types depending on the type of the value passed. For these cases, there are variable type conversion functions. Type conversion functions shows the type of conversion functions:

Table 1. Type conversion functions

Syntax

Description

string(value)

Converts the values as a string type.

boolean(value)

Converts the values as a Boolean type. Any nonzero number is converted to TRUE. The only strings that convert are “true” and “false” including all capitalization variations.

numeric(value)

Converts the values as a numeric type. All numeric values are stored as double-floating point.