Variable and type handling
| Operator | Summary |
|---|---|
| count | Returns the count of the input parameter. |
| float | Converts the input parameter to a float. |
| get_class | Returns the class name of an object. |
| get_type | Returns the type of the provided variable. |
| int | Converts the input parameter to an integer. |
| is_array | Returns TRUE if the provided variable is an array. |
| is_boolean | Returns TRUE if the provided variable is a boolean. |
| is_class | Returns TRUE if an object is an instance of a specific class. |
| is_float | Returns TRUE if the provided variable is a float. |
| is_integer | Returns TRUE if the provided variable is an integer. |
| is_null | Returns TRUE if the provided variable is NULL. |
| is_numeric | Returns TRUE if the provided variable is a number. |
| is_object | Returns TRUE if the target variable is an object. |
| is_set | Returns TRUE if the value of the provided variable is set. |
| is_string | Returns TRUE if the provided variable is a string. |
| is_unset | Returns TRUE if the provided variable is not set (has no value). |
In this section
- count Exponential Documentation
- float This operator attempts to convert the input parameter to a float. It returns the converted value as a float. If the operator is unable to do the conversion, it will return a value of zero (0).
- get_class This operator gets the class of the input parameter or the target variable. It returns the PHP class name as a string. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated. If the provided variable is not an object then the operator will
- get_type This operator can be used to check the type of a variable. It returns the type of the input parameter or the target variable as a string. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- int This operator attempts to convert the input parameter to an integer. It will return the converted value as an integer. If the operator is unable to do the conversion, it will return the value of zero (0).
- is_array This operator checks if the input parameter or the target variable is an array. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- is_boolean This operator checks if the input parameter or the target variable is a boolean. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- is_class This operator attempts to find out the class name of the object that is provided either as the input parameter or the "object" parameter. If the name of the class matches the name provided using the "name" parameter, the function will return TRUE; otherwise FALSE will be returned.
- is_float This operator checks if the input parameter or the target variable is a float. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- is_integer This operator checks if the input parameter or the target variable is an integer. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- is_null This operator checks if the input parameter or the target variable is NULL. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated. Please note that an integer with
- is_numeric This operator checks if the input parameter or the target variable is a number or a numeric string (a string containing a number). If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable th
- is_object This operator checks if the input parameter or the target variable is an object (as opposed to simple types like integer, string, etc.). If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target varia
- is_set This operator checks if the value of the target parameter is a non-false value (meaning that it is set). If it is, the operator will return TRUE, otherwise FALSE will be returned. Please note that this operator does not take an input parameter.
- is_string This operator checks if the input parameter or the target variable is a string. If it is, the operator will return TRUE, otherwise FALSE will be returned. If both the input parameter and the target variable are provided, it is the target variable that will be evaluated.
- is_unset This operator checks if the target variable is set (has a value). If it is, the operator returns FALSE, otherwise TRUE will be returned.
Contributors
- Balazs Halasy Updated
Comments
Add a comment