Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 1.36 KB

SplInt.md

File metadata and controls

63 lines (45 loc) · 1.36 KB

(PHP 7, PHP 8)

The SplInt class is used to enforce strong typing of the integer type.

SplInt extends SplType {
    /* Constants */
    public const integer __default = 0;
    /* Methods */
    public function __construct ([ int $initial_value = 0 ])
    final public function &__invoke(): int
}

SplInt::__default

Example #1 SplInt usage example

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

echo $int . PHP_EOL;

The above example will output:

94