downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SplString> <SplEnum::getConstList
[edit] Last updated: Wed, 22 May 2013

view this page in

La clase SplBool

(No hay información de versión disponible, podría estar únicamente en SVN)

Introducción

La clase SplBool es usada para forzar el uso del tipo booleano.

Sinopsis de la Clase

SplBool extends SplEnum {
/* Constants */
const boolean __default = false ;
const boolean false = false ;
const boolean true = true ;
/* Métodos heredados */
public array SplEnum::getConstList ([ bool $include_default = false ] )
}

Constantes predefinidas

SplBool::__default

SplBool::false

SplBool::true

Ejemplos

Ejemplo #1 Ejemplo de uso de SplBool

<?php
$true 
= new SplBool(true);
if (
$true) {
    echo 
"TRUE\n";
}

$false = new SplBool;
if (
$false) {
    echo 
"FALSE\n";
}
?>

El resultado del ejemplo sería:

TRUE



add a note add a note User Contributed Notes SplBool - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites