Dans :
Fonctions PHP
Concepts PHP
Fonctions MySQL
Fonctions HTML
Forum PHP/MySQL
Cours PHP/MySQL
Scripts PHP/MySQL
is_bool détermine si la variable donnée est un booléen.
Retourne TRUE si var est un booléen , FALSE sinon.
<?php$a = false;$b = 0;// Si $a est un booléen, ceci sera vraiif (is_bool($a)) { echo "Oui, C'est un booléen.";}// Si $b n'est pas un booléen, ceci sera fauxif (is_bool($b)) { echo "Oui, C'est un booléen.";}?>