SplBool
PHP 手册

SplBool::__construct

(No version information available, might be only in CVS)

SplBool::__constructConstructs a bool object type

说明

SplBool::__construct ( void )

This constructs a new object of type bool.

参数

input

The input parameter accepts a bool.

strict

A boolean variable to indicate wether the object's strictness should be set or not.

返回值

无返回值。

范例

Example #1 SplBool::__construct() example

<?php
$one 
= new SplBool(true);
$two = new SplBool(1);

var_dump($one);
var_dump($two);
?>

上例将输出:

object(SplBool)#1 (1) {
  ["__default"]=>
  bool(true)
}
object(SplBool)#1 (1) {
  ["__default"]=>
  bool(true)
}


SplBool
PHP 手册