SPLBOOL(3) 1 SPLBOOL(3)
The SplBool class
INTRODUCTION
The SplBool class is used to enforce strong typing of the bool type.
CLASS SYNOPSIS
SplBool
SplBoolextends
SplEnum
Constants
o const boolean$SplBool::__defaultfalse
o const boolean$SplBool::falsefalse
o const boolean$SplBool::truetrue
Inherited methods
o public array SplEnum::getConstList ([bool $include_default = false])
PREDEFINED CONSTANTS
o SplBool::__default -
o SplBool::false -
o SplBool::true -
EXAMPLES
Example #1
SplBool usage example
<?php
$true = new SplBool(true);
if ($true) {
echo "TRUE
";
}
$false = new SplBool;
if ($false) {
echo "FALSE
";
}
?>
The above example will output:
TRUE
PHP Documentation Group SPLBOOL(3)