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

search for in the

SplString> <SplBool
Last updated: Fri, 14 Aug 2009

view this page in

SplBool::__construct

(PECL spl_types >= 0.1.0)

SplBool::__constructConstruit un objet de type booléen

Description

SplBool::__construct ( void )

Ce constructeur est utilisé pour attribuer et garantir le type de l'objet booléen.

Liste de paramètres

input

Le paramètre input prendre un boolean et produit une exception UnexpectedValueException si autre chose lui est passé.

strict

Une variable de type boolean pour indiquer la souplesse du typage.

Valeurs de retour

Aucune valeur n'est retournée.

Exemples

Exemple #1 Exemple avec SplBool::__construct()

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

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

L'exemple ci-dessus va afficher :

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



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

SplString> <SplBool
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites