first commit
This commit is contained in:
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
# Respect\Stringifier
|
||||
|
||||
[](https://github.com/Respect/Stringifier/actions/workflows/continuous-integration.yml)
|
||||
[](https://codecov.io/gh/Respect/Stringifier)
|
||||
[](https://packagist.org/packages/respect/stringifier)
|
||||
[](https://packagist.org/packages/respect/stringifier)
|
||||
[](https://packagist.org/packages/respect/stringifier)
|
||||
|
||||
Converts any PHP value into a string.
|
||||
|
||||
## Installation
|
||||
|
||||
Package is available on [Packagist](https://packagist.org/packages/respect/stringifier), you can install it
|
||||
using [Composer](http://getcomposer.org).
|
||||
|
||||
```bash
|
||||
composer require respect/stringifier
|
||||
```
|
||||
|
||||
This library requires PHP >= 8.1.
|
||||
|
||||
## Feature Guide
|
||||
|
||||
Below a quick guide of how to use the library.
|
||||
|
||||
### Namespace import
|
||||
|
||||
Respect\Stringifier is namespaced, and you can make your life easier by importing
|
||||
a single function into your context:
|
||||
|
||||
```php
|
||||
use function Respect\Stringifier\stringify;
|
||||
```
|
||||
|
||||
Stringifier was built using objects, the `stringify()` is a easy way to use it.
|
||||
|
||||
### Usage
|
||||
|
||||
Simply use the function to convert any value you want to:
|
||||
|
||||
```php
|
||||
echo stringify($value);
|
||||
```
|
||||
|
||||
To see more examples of how to use the library check the [integration tests](tests/integration).
|
||||
Reference in New Issue
Block a user