is_array
<<<
is_bool is_callable
>>>

8.127 Fonctions de gestion des variables
8 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Types de ressources
Constantes pré-définies
debug_zval_dump
doubleval
empty
floatval
get_defined_vars
get_resource_type
gettype
import_request_variables
intval
is_array
->is_bool
is_callable
is_double
is_float
is_int
is_integer
is_long
is_null
is_numeric
is_object
is_real
is_resource
is_scalar
is_string
isset
print_r
serialize
settype
strval
unserialize
unset
var_dump
var_export

8.127.17 is_bool() Détermine si une variable est un booléen

[ Exemples avec is_bool ]   PHP 4 , PHP 5

bool  is_bool ( mixed   var )

is_bool détermine si la variable donnée est un booléen.

    var
    La variable à évaluer.

Retourne TRUE si var est un booléen , FALSE sinon.

Exemple avec is_bool

<?php
$a
= false;
$b = 0;

// Si $a est un booléen, ceci sera vrai
if (is_bool($a)) {
    echo
"Oui, C'est un booléen.";
}

// Si $b n'est pas un booléen, ceci sera faux
if (is_bool($b)) {
    echo
"Oui, C'est un booléen.";
}
?>

<< is_bool >>
is_array Fonctions de gestion des variables is_callable