is_bool
symfony/var-dumper
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds out whether a variable is a boolean
is_bool
(
mixed $value
):
bool
$signature
.=
$v
?
'[…'
.
\count
(
$v
).
']'
:
'[]'
;
} elseif (
\is_string
(
$v
)) {
$signature
.=
10
>
\strlen
(
$v
) && !
str_contains
(
$v
,
'\\'
) ?
"'
{
$v
}
'"
:
"'…"
.
\strlen
(
$v
).
"'"
;
} elseif (
\is_bool
(
$v
)) {
$signature
.=
$v
?
'true'
:
'false'
;
} elseif (
\is_object
(
$v
)) {
$signature
.=
'new '
.
substr
(
strrchr
(
'\\'
.
get_debug_type
(
$v
),
'\\'
),
1
);
Caster/ReflectionCaster.php
switch (
true
) {
case
null
===
$v
:
case
\is_bool
(
$v
):
case
\is_int
(
$v
):
case
\is_float
(
$v
):
continue
2
;
Cloner/VarCloner.php