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

search for in the

SplFloat> <SplInt
Last updated: Fri, 21 Nov 2008

view this page in

SplInt::__construct

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

SplInt::__constructConstructs an integer object type

Описание

SplInt::__construct ( void )

This constructs a new object of type float.

Список параметров

input

The input parameter accepts an integer An UnexpectedValueException Exception will be thrown if anything is passed.

Возвращаемые значения

Эта функция не возвращает значения после выполнения.

Примеры

Пример #1 SplInt::__construct() example

<?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
?>

Результат выполнения данного примера:

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



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

SplFloat> <SplInt
Last updated: Fri, 21 Nov 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites