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

search for in the

SplString> <SplEnum::getConstList
[edit] Last updated: Fri, 25 May 2012

view this page in

SplBool クラス

(バージョン情報なし。おそらく SVN 版にしか存在しないでしょう)

導入

SplBool クラスは bool 型をより強力に型付けするために使用します。

クラス概要

SplBool extends SplEnum {
/* 定数 */
const boolean __default = false ;
const boolean false = false ;
const boolean true = true ;
/* 継承したメソッド */
public array SplEnum::getConstList ([ bool $include_default = false ] )
}

定義済み定数

SplBool::__default

SplBool::false

SplBool::true

例1 SplBool の使用例

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

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

上の例の出力は以下となります。

TRUE



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

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