core
Table of Contents
Namespaces
Functions
- ifNull() : mixed
- Returns the given value if it is not null; otherwise, returns the default value.
Functions
ifNull()
Returns the given value if it is not null; otherwise, returns the default value.
ifNull(mixed $value[, mixed $default = null ]) : mixed
This function is useful to provide a fallback value when a variable might be null.
Parameters
- $value : mixed
-
The value to evaluate.
- $default : mixed = null
-
The default value to return if $value is null. Defaults to null.
Tags
Return values
mixed —Returns $value if it is not null; otherwise returns $default.