Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [The SplBool class]

Protect Your Website Today


PHP Manual || SPL Types

(PECL spl_types >= 0.1.0)

The SplBool class is used to enforce strong typing of the bool type.

SplBool extends SplEnum {
/* Constants */
const boolean __default = FALSE ;
const boolean false = FALSE ;
const boolean true = TRUE ;
/* Inherited methods */
public SplEnum::getConstList ([ bool $include_default = FALSE ] ) : array
}
SplBool::__default

SplBool::false

SplBool::true

Example #1 SplBool usage example

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

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

The above example will output:

TRUE



PHP Manual || SPL Types