<?php
use Granam\String\StringObject;
use Granam\String\Exceptions\WrongParameterType;
$string = new StringObject(12345.678);
echo $string; // string '12345.678'
try {
new StringObject(fopen('foo', 'rb'));
} catch (WrongParameterType $stringException) {
// Expected scalar or object with \_\_toString method on strict mode, got resource.
die('Something get wrong: ' . $stringException->getMessage());
}
-
Notifications
You must be signed in to change notification settings - Fork 0
A string value wrapped in an object
License
granam/string
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A string value wrapped in an object
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published