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

search for in the

SplFloat> <SplInt
[edit] Last updated: Fri, 24 Jun 2011

view this page in

SplInt::__construct

(PECL spl_types >= 0.1.0)

SplInt::__constructساخت شی نوع صحیح

Description

SplInt::__construct() ( integer $input )

ساخت شی از نوع صحیح.

Parameters

input

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

Return Values

No value is returned.

Examples

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

<?php
$int 
= new SplInt(94);

try {
    
$int 'Try to cast a string value for fun';
} catch (
UnexpectedValueException $uve) {
    echo 
$uve->getMessage() . PHP_EOL;
}

var_dump($int);
echo 
$int// Outputs 94
?>

The above example will output:

Value not an integer
object(SplInt)#1 (1) {
  ["__default"]=>
  int(94)
}
94



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

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