Variables
Table of Contents
Constants
- PHP_ZERO_TOLERANCE = 9.999999999999999E-12
- Default error tolerance.
Functions
- is_closed_resource() : mixed
- Finds whether the given variable is a resource that has been closed.
- is_negative_int() : mixed
- Find whether a variable is an integer and less than zero.
- is_non_empty_string() : mixed
- Find whether a variable is a non-empty string.
- is_non_negative_int() : mixed
- Find whether a variable is an integer and not less than zero.
- is_non_positive_int() : mixed
- Find whether a variable is an integer and not greater than zero.
- is_non_zero_int() : mixed
- Find whether a variable is an integer and not zero.
- is_number() : mixed
- Find whether a variable is a number (either an integer or a float).
- is_positive_int() : mixed
- Find whether a variable is an integer and greater than zero.
- is_zero() : bool
- Finds whether the given number is (sufficiently close to) 0.
Constants
PHP_ZERO_TOLERANCE
Default error tolerance.
public
mixed
PHP_ZERO_TOLERANCE
= 9.999999999999999E-12
Functions
is_closed_resource()
Finds whether the given variable is a resource that has been closed.
is_closed_resource(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a resource variable that has been closed, false otherwise.
is_negative_int()
Find whether a variable is an integer and less than zero.
is_negative_int(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a negative integer, false otherwise.
is_non_empty_string()
Find whether a variable is a non-empty string.
is_non_empty_string(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a non-empty string, false otherwise.
is_non_negative_int()
Find whether a variable is an integer and not less than zero.
is_non_negative_int(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a non-negative integer, false otherwise.
is_non_positive_int()
Find whether a variable is an integer and not greater than zero.
is_non_positive_int(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a non-positive integer, false otherwise.
is_non_zero_int()
Find whether a variable is an integer and not zero.
is_non_zero_int(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a non-zero integer, false otherwise.
is_number()
Find whether a variable is a number (either an integer or a float).
is_number(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is an integer or a float, false otherwise.
is_positive_int()
Find whether a variable is an integer and greater than zero.
is_positive_int(mixed $value) : mixed
Parameters
- $value : mixed
-
The variable being evaluated.
Return values
mixed —Returns true if value is a positive integer, false otherwise.
is_zero()
Finds whether the given number is (sufficiently close to) 0.
is_zero(int|float $value[, float|null $tolerance = PHP_ZERO_TOLERANCE ]) : bool
Parameters
- $value : int|float
-
The number being evaluated.
- $tolerance : float|null = PHP_ZERO_TOLERANCE
-
Tolerance allowed when evaluating the number.
Return values
bool —Returns true if value is (sufficiently close to) 0
,
false otherwise.