PHP Classes

File: src/Functions/int.php

Recommend this page to a friend!
  Classes of Axel Pardemann  >  PHP Scalar Objects  >  src/Functions/int.php  >  Download  
File: src/Functions/int.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Scalar Objects
Implement objects that behave like scalar values
Author: By
Last change:
Date: 3 years ago
Size: 373 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
NorseBlue\ScalarObjects\Functions;

use
NorseBlue\ScalarObjects\Types\IntType;
use
NorseBlue\ScalarObjects\Types\NumberType;

/**
 * Create a new IntType object.
 *
 * @param int|float|NumberType $value
 *
 * @return \NorseBlue\ScalarObjects\Types\IntType
 */
function int($value = 0): IntType
{
    return new
IntType($value);
}

For more information send a message to info at phpclasses dot org.