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                 $value = '['.implode(', ', $value).']';

            }



            if (is_bool($value)) {

                $value = var_export($value, true);

            }
<?php     public static function fromBoolOrList($boolOrList)

    {

        if (is_bool($boolOrList)) {

            return $boolOrList ? self::ignoreAll() : self::ignoreNothing();

        }
<?php         $falseRegex = $this->falseAnswerRegex;



        return function ($answer) use ($default, $trueRegex, $falseRegex) {

            if (is_bool($answer)) {

                return $answer;

            }

            if (empty($answer) && !empty($default)) {
<?php     private function getDefaultValidator()

    {

        return function ($answer) {

            if (!is_bool($answer)) {

                throw new InvalidArgumentException('Please answer yes, y, no, or n.');

            }
<?php             throw new \InvalidArgumentException('Only one of "only" and "exclude" can be specified for repository '.$repo->getRepoName());

        }

        if (isset($options['canonical'])) {

            if (!is_bool($options['canonical'])) {

                throw new \InvalidArgumentException('"canonical" key for repository '.$repo->getRepoName().' should be a boolean');

            }

            $this->canonical = $options['canonical'];