Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds out whether a variable is a boolean
<?php is_bool(mixed $value): bool
<?php                     $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);
<?php                 switch (true) {

                    case null === $v:

                    case \is_bool($v):

                    case \is_int($v):

                    case \is_float($v):

                        continue 2;