PHPackages                             clue/caret-notation - 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. clue/caret-notation

ActiveLibrary

clue/caret-notation
===================

^B A dead-simple PHP library to add caret notation in order to safely show strings that contain ASCII control characters (unprintable characters)

v0.2.0(10y ago)24.4k↓31.8%1[2 issues](https://github.com/clue/php-caret-notation/issues)1MITPHPPHP &gt;=5.3

Since Jun 19Pushed 10y ago3 watchersCompare

[ Source](https://github.com/clue/php-caret-notation)[ Packagist](https://packagist.org/packages/clue/caret-notation)[ Docs](https://github.com/clue/php-caret-notation)[ RSS](/packages/clue-caret-notation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (1)

clue/caret-notation [![Build Status](https://camo.githubusercontent.com/cd03d1c0843a328c4774db5ef88d20d473522c233e1e015513a0e102de2b90eb/68747470733a2f2f7472617669732d63692e6f72672f636c75652f7068702d63617265742d6e6f746174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/clue/php-caret-notation)
========================================================================================================================================================================================================================================================================================================================

[](#cluecaret-notation-)

^B A dead-simple PHP library to add [caret notation](https://en.wikipedia.org/wiki/Caret_notation)in order to safely show strings that contain [ASCII control characters](https://en.wikipedia.org/wiki/Control_character#In_ASCII)(unprintable characters)

Quickstart example
------------------

[](#quickstart-example)

Once [installed](#install), you can use the following code to use caret notation for any string that (may possibly) contain binary control characters:

```
$encoder = new Encoder();

$string = "Hello\r\nworld\0";
// Output: Hello^M^Jworld^@
echo $encoder->encode($string);

$string = "No control chars";
// Output: No control chars
echo $encoder->encode($string);
```

Install
-------

[](#install)

The recommended way to install this library is [through composer](http://getcomposer.org). [New to composer?](http://getcomposer.org/doc/00-intro.md)

```
{
    "require": {
        "clue/caret-notation": "~0.2.0"
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3986d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776829?v=4)[Christian Lück](/maintainers/clue)[@clue](https://github.com/clue)

---

Top Contributors

[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (5 commits)")

---

Tags

encodingasciibinaryhexdumpcontrol characterscaret notation

### Embed Badge

![Health badge](/badges/clue-caret-notation/health.svg)

```
[![Health](https://phpackages.com/badges/clue-caret-notation/health.svg)](https://phpackages.com/packages/clue-caret-notation)
```

###  Alternatives

[paragonie/constant_time_encoding

Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)

903329.7M148](/packages/paragonie-constant-time-encoding)[voku/portable-ascii

Portable ASCII library - performance optimized (ascii) string functions for php.

574401.5M117](/packages/voku-portable-ascii)[h4cc/wkhtmltopdf-amd64

Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.

48724.6M38](/packages/h4cc-wkhtmltopdf-amd64)[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[zbateson/mb-wrapper

Wrapper for mbstring with fallback to iconv for encoding conversion and string manipulation

4948.6M5](/packages/zbateson-mb-wrapper)[clue/hexdump

View any (binary) string as a hexdump

1256.0k3](/packages/clue-hexdump)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
