PHP Classes

File: src/Functions/string.php

Recommend this page to a friend!
  Classes of Axel Pardemann   PHP Scalar Objects   src/Functions/string.php   Download  
File: src/Functions/string.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: 5 years ago
Size: 343 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
NorseBlue\ScalarObjects\Functions;

use
NorseBlue\ScalarObjects\Types\StringType;

/**
 * Create a new StringType object.
 *
 * @param string|StringType $value
 *
 * @return \NorseBlue\ScalarObjects\Types\StringType
 */
function string($value = ''): StringType
{
    return new
StringType($value);
}