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

search for in the

ストリーム> <SplString
Last updated: Fri, 13 Nov 2009

view this page in

SplString::__construct

(PECL spl_types >= 0.1.0)

SplString::__construct文字列型のオブジェクトを作成する

説明

SplString::__construct ( string $input )

これは、文字列型の新しいオブジェクトを作成します。

パラメータ

input

input パラメータには文字列を指定します。 それ以外のものが渡された場合は UnexpectedValueException 例外をスローします。

返り値

値を返しません。

例1 SplString::__construct() の例

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

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

var_dump($string);
echo 
$string// "Testing" を出力します
?>

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

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



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

ストリーム> <SplString
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites