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

search for in the

Streams> <SplString
[edit] Last updated: Fri, 24 Jun 2011

view this page in

SplString::__construct

(PECL spl_types >= 0.1.0)

SplString::__constructساخت نوع شی رشته

Description

SplString::__construct() ( string $input )

ساخت شی جدید از نوع رشته.

Parameters

input

پارامتر input مقادییر string را می‌پذیرد استثنا UnexpectedValueException برای موارد ارسالی دیگر ایجاد می‌شود.

Return Values

No value is returned.

Examples

Example #1 مثال SplString::__construct()

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

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

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

The above example will output:

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



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

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