Str::toType()
Convert the string to the given type
Str::toType(mixed $string, mixed $type)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $stringrequired | mixed |
no default value | |
| $typerequired | mixed |
no default value | Type name or a value of the target type |