PHPackages                             gregorj/to-string - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gregorj/to-string

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gregorj/to-string
=================

A simple PHP library for turning values into readable strings.

v1.0.0(2mo ago)02251MITPHPPHP ^8.1CI passing

Since Apr 7Pushed 2mo agoCompare

[ Source](https://github.com/gregor-j/ToString)[ Packagist](https://packagist.org/packages/gregorj/to-string)[ RSS](/packages/gregorj-to-string/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

ToString
========

[](#tostring)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

This is a simple PHP library for turning values into readable strings. Its main purpose is to make strings and byte data printable by escaping non-printable characters instead of returning raw control bytes. This means, binary data is supported.

The library currently provides helpers for:

- booleans
- bytes
- strings
- arrays
- generic `mixed` values

Installation
------------

[](#installation)

```
composer require gregorj/to-string
```

Usage
-----

[](#usage)

```
