Recherche sur les Noms des fonctions php/mysql
is_bool()
Définition
- (PHP 4, PHP 5)Description
is_bool() détermine si la variable donnée est un booléen.
Liste de paramètres
- var
-
La variable à évaluer.
Valeurs de retour
Retourne TRUE si var est un booléen, FALSE sinon.
Exemples
Exemple #1 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.";
}
?>
Bouts de code utilisant la fonction is_bool()
<?php /* ... */
{/* for future use */
if (is_bool($_to_check))
{return True;}
/* ... */ ?>
<?php /* ... */
if (array_key_exists ($clef, $this -> options)
&& is_bool ($opt)) {
$this -> options[$clef] = $opt;
/* ... */ ?>
<?php /* ... */
if (array_key_exists ($clef, $this -> options)
&& is_bool ($opt)) {
$this -> options[$clef] = $opt;
/* ... */ ?>
Connexion
Les fonctions
Références
- debug_zval_dump
- doubleval
- empty
- floatval
- get_defined_vars
- get_resource_type
- gettype
- import_request_variables...
- intval
- is_array
- is_binary
- is_bool
- is_buffer
- 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
- is_unicode
- isset
- print_r
- serialize
- settype
- strval
- unserialize
- unset
- var_dump
- var_export





