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

search for in the

Flux> <SplBool
[edit] Last updated: Fri, 24 May 2013

view this page in

La classe SplString

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

Introduction

La classe SplString sert à assurer le typage fort des chaînes.

Synopsis de la classe

SplString extends SplType {
/* Constantes */
const integer __default = 0 ;
/* Méthodes héritées */
SplType::__construct ([ mixed $initial_value [, bool $strict ]] )
}

Constantes pré-définies

SplString::__default

Exemples

Exemple #1 Exemple d'utilisation SplString

<?php
$string 
= new SplString("Testing");

try {
    
$string = array();
} catch (
UnexpectedValueException $uve) {
    echo 
$uve->getMessage() . PHP_EOL;
}

var_dump($string);
echo 
$string// Affiche : "Testing"
?>

L'exemple ci-dessus va afficher :

Value not a string
object(SplString)#1 (1) {
  ["__default"]=>
  string(7) "Testing"
}
Testing



add a note add a note User Contributed Notes SplString - [0 notes]
There are no user contributed notes for this page.

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