isLiteral.php
Table of Contents
Functions
- isLiteral() : bool
- Checks whether a given value is a literal string representing a boolean (`true` or `false`) or `null`.
Functions
isLiteral()
Checks whether a given value is a literal string representing a boolean (`true` or `false`) or `null`.
isLiteral(mixed $value) : bool
This function returns true
only if the value is a string and equals (case-insensitive)
to one of the three literal values: "true", "false", or "null".
Parameters
- $value : mixed
-
The value to test.
Tags
Return values
bool —Returns true if the value is a string and matches "true", "false", or "null" (case-insensitive).