Новости | Документация | Download | Webboard | FAQ | Поиск | Контакты


SplInt::__construct

(PECL spl_types >= 0.1.0)

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






  Copyright Apache.ru © 1999-2017, All Rights Reserved Разработка сайта: Inside.ru  
  РЕКЛАМА НА САЙТЕ: |