PHPackages                             linio/safeecho - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. linio/safeecho

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

linio/safeecho
==============

Lightweight function to easily hide printed data.

0.1(7y ago)13661[1 PRs](https://github.com/LinioIT/safeecho/pulls)MITPHPPHP &gt;=7.1CI failing

Since Dec 1Pushed 5y ago53 watchersCompare

[ Source](https://github.com/LinioIT/safeecho)[ Packagist](https://packagist.org/packages/linio/safeecho)[ RSS](/packages/linio-safeecho/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

safeecho
========

[](#safeecho)

Purpose
-------

[](#purpose)

Replacement function for echo/print. It will take the string, hide it and then wrap the new hidden string with whatever wrapper is specified.

`echo John Smith` will print `John Smith`

Out-of-the-box `safeecho('John Smith')` will print `J*** S****`

With a configuration file `safeecho('John Smith')` can print `J*** S****`

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

[](#installation)

The supported way of installing safeecho is via Composer.

```
$ composer require linio/safeecho
```

### Autoload function

[](#autoload-function)

In the `composer.json` file, add or append to the "autoload" field,

```
"autoload": {
    "files": [
        "vendor/linio/safeecho/src/safeecho.php"
    ]
}

```

### Configure safeecho Output

[](#configure-safeecho-output)

To override the default configuration of `safeecho`, you will need a configuration file.

Accepted file names are: `safeecho.ini``safeecho.json``safeecho.php``safeecho.xml``safeecho.yaml``safeecho.yml`

Configuration files are searched for in the above order. The first configuration file found, is the configuration that is used.

The recommended location for the configuration is the project root directory.

#### Example YML Configurations

[](#example-yml-configurations)

`safeecho.yml`

```
decorator: Linio\SafeEcho\Decorator\MouseHoverDecorator

```

If you want to change the 'hideChar'

`safeecho.yml`

```
decorator: Linio\SafeEcho\Decorator\MouseHoverDecorator
hideChar: '~'

```

`safeecho('John Smith')` will now print `J~~~ S~~~~`

To use your own custom Decorator:

- `YourCustomDecorator` must extend `SafeEchoDecorator`

`safeecho.yml`

```
decorator:
    class: \Path\To\YourCustomDecorator
    arguments:
        arg1: arg1Value
        arg2: arg2Value

```

Please see [safeecho Configuration File](CONFIG.md) for configuration file examples.

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Unknown

Total

1

Last Release

2849d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9ba9a1e115b27dbff7b98800fad30327f99bef227202e72fa896b1780440692?d=identicon)[linio](/maintainers/linio)

---

Top Contributors

[![melissabillias](https://avatars.githubusercontent.com/u/3584815?v=4)](https://github.com/melissabillias "melissabillias (16 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (2 commits)")[![camcima](https://avatars.githubusercontent.com/u/1918601?v=4)](https://github.com/camcima "camcima (1 commits)")[![lguima](https://avatars.githubusercontent.com/u/1562097?v=4)](https://github.com/lguima "lguima (1 commits)")

---

Tags

loggingsecuritypasswordencryptsecureprintecholiniosafeechosafe echosafe print

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/linio-safeecho/health.svg)

```
[![Health](https://phpackages.com/badges/linio-safeecho/health.svg)](https://phpackages.com/packages/linio-safeecho)
```

###  Alternatives

[genphrase/genphrase

Secure passphrase generator for PHP applications

118302.5k4](/packages/genphrase-genphrase)[putyourlightson/craft-sherlock

Security scanner and monitor to keep your site and CMS secure.

1657.0k2](/packages/putyourlightson-craft-sherlock)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3171.5k2](/packages/miladrahimi-phpcrypt)[johannschopplich/kirby-locked-pages

Password-protect pages for the Kirby CMS

403.8k](/packages/johannschopplich-kirby-locked-pages)

PHPackages © 2026

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