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

search for in the

Akımlar> <SplBool
[edit] Last updated: Fri, 23 Mar 2012

view this page in

The SplString class

(Bir sürüm bilgisi bulunamadı; sadece SVN'de olabilir.)

Giriş

The SplString class is used to enforce strong typing of the string type.

Sınıf Sözdizimi

SplString extends SplType {
/* Constants */
const integer __default = 0 ;
/* Miras alınan yöntemler */
SplType::__construct ([ mixed $initial_value [, bool $strict ]] )
}

Öntanımlı Sabitler

SplString::__default

Örnekler

Örnek 1 SplString usage example

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

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

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

Yukarıdaki örneğin çıktısı:

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



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

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