PHPackages                             kktsvetkov/wano - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. kktsvetkov/wano

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

kktsvetkov/wano
===============

PHP error messages reporting tool

v1.0(8y ago)54174[4 issues](https://github.com/kktsvetkov/Wano/issues)LGPL-3.0PHPPHP &gt;=5.3.0

Since Aug 11Pushed 4y ago2 watchersCompare

[ Source](https://github.com/kktsvetkov/Wano)[ Packagist](https://packagist.org/packages/kktsvetkov/wano)[ Docs](https://github.com/kktsvetkov/Wano)[ RSS](/packages/kktsvetkov-wano/feed)WikiDiscussions master Synced 1mo ago

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

[![Wano Screenshot](https://camo.githubusercontent.com/bacadef0f0da44b309384d615194f082b7245db0638da6f12320f5c0947b1a2d/687474703a2f2f6b616c6f79616e2e696e666f2f77616e6f2e6769746875622e636f6d2f312e706e67 "Screenshot from \Wano\Display\NiftyDisplay")](https://camo.githubusercontent.com/bacadef0f0da44b309384d615194f082b7245db0638da6f12320f5c0947b1a2d/687474703a2f2f6b616c6f79616e2e696e666f2f77616e6f2e6769746875622e636f6d2f312e706e67)

Wano
====

[](#wano)

Wano (short for **WA**rnings &amp; **NO**tices), is a small PHP tool meant to help reporting PHP error messages.

It is meant to be very easy to use. If you have any experience with PHP error messages such as warnings and notices, you know how annoying it is to have them pop up in the middle of your printed markup, in attributes and between HTML tags, messing things up. ***Wano*** is meant to help with that.

It is also important to mention that it is a bad policy to ignore and silence PHP error messages. That has its toll on your PHP code performance. If you clean up all the warnings, notices, etc. you are going to improve the execution time of your scripts.

Basic use
---------

[](#basic-use)

In order to use it, you just need to call `\Wano\Nab::register()`

```
	\Wano\Nab::register();
```

...and that's it. Default settings and configurations will be used and you do not have to do anything else.

How it works ?
--------------

[](#how-it-works-)

***Wano*** does two things:

- first, it registers a custom error\_handler that will collect the PHP error messages raised by the code
- second, it attached a callback through register\_shutdown\_function() that prints the collected PHP error messages at the end of the page

By doing the above, you are going to have the printed HTML content without being riddled with PHP error messages, and in the same time you are still going to see them as a report appended at the end of the page. It's that simple. The idea is not to have clumsy and overdressed library, but a simple tool that its job well.

What's inside ?
---------------

[](#whats-inside-)

As explained above, there are two tasks that ***Wano*** does: a) collects the PHP error messages and b) print them at the end of the page.

`\Wano\Nab` is the class that has the custom error\_handler, which collects the PHP error messages.

`\Wano\Display\` namespace houses the classes used to render the list of collected PHP error messages. There is the `\Wano\Display\DisplayInterface` interface that must be implemented if you want to create a new such "Display" class.

Advance use
-----------

[](#advance-use)

Here's what you can do to step out of the default behaviour and settings.

You can choose what type of PHP error levels ***Wano*** should collect. The format is the same used for error\_reporting() -- a bitmask of the error levels. This is provided as the argument for `\Wano\Nab::register()`

```
	\Wano\Nab::register(E_WARNING | E_USER_WARNING | E_NOTICE | E_USER_NOTICE);
```

Backtraces are really helpful when you want to track how a certain PHP error message was raised. On the other hand, in some occasions for some PHP error message levels having backtraces is just overhead. Using the same bitmask format you can declare which PHP error message levels to include backtraces when they are reported:

```
	\Wano\Nab::$backtrace = E_WARNING | E_USER_WARNING;
```

You can change how the results are printed by creating your own `\Wano\Display` class. To do that you have to create a new class that is implementing the `\Wano\Display\DisplayInterface` interface, and then use `\Wano\Nab::setDisplay()` method to attach it:

```
	\Wano\Nab::setDisplay(new \Wano\Display\BasicDisplay);
```

This is not recommended, but if you want to, you can manually report directly into ***Wano***, like this:

```
	\Wano\Nab::error_log(E_USER_WARNING, 'egati probata', __FILE__, __LINE__);
```

If for whatever reason you do not want to have a register\_shutdown\_function() print the results, you can do it manually. For that purpose you need to replace `\Wano\Nab::register()` with `\Wano\Nab::registerErrorHandler()` which will only attach the custom error\_handler. Then, you are ready to print the results, you have to call `\Wano\Nab::display()`

```
	\Wano\Nab::registerErrorHandler();
	...

	// It's time, print what you have collected already
	\Wano\Nab::display();
```

Examples
--------

[](#examples)

You can find few examples inside the [`examples/`](/examples/) folder. Here you can see them in action:

- [examples/nifty.php](http://kaloyan.info/wano.github.com/demo/nifty.php) using [`\Wano\Display\NiftyDisplay`](/src/Display/NiftyDisplay.php)[![examples\nifty.php](https://camo.githubusercontent.com/fa60f086e6cbe11720e130ef6519b4521b9f6e1778b237c5b8e2a7af25a13cb5/687474703a2f2f6b616c6f79616e2e696e666f2f77616e6f2e6769746875622e636f6d2f322e706e67)](http://kaloyan.info/wano.github.com/demo/nifty.php)
- [examples/basic.php](http://kaloyan.info/wano.github.com/demo/basic.php) using [`\Wano\Display\BasicDisplay`](/src/Display/BasicDisplay.php)[![examples\basic.php](https://camo.githubusercontent.com/642a96e7f855beb15533d372a8887037c9c35644f51c27688461d5ec37631d0b/687474703a2f2f6b616c6f79616e2e696e666f2f77616e6f2e6769746875622e636f6d2f332e706e67)](http://kaloyan.info/wano.github.com/demo/basic.php)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3193d ago

### Community

Maintainers

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

---

Top Contributors

[![kktsvetkov](https://avatars.githubusercontent.com/u/694812?v=4)](https://github.com/kktsvetkov "kktsvetkov (8 commits)")

---

Tags

error-handlererror-handlingphp-error-handlerphp-errorhandlerphp-errorserror-handlerstrictwarningnoticeerror-messages

### Embed Badge

![Health badge](/badges/kktsvetkov-wano/health.svg)

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

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M914](/packages/symfony-stopwatch)[php-console/php-console

PHP library for Google Chrome extension "PHP Console".

1.3k2.9M41](/packages/php-console-php-console)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[php-console/laravel-service-provider

Laravel service provider to handle PHP errors, dump variables, execute PHP code remotely in Google Chrome

7361.2k1](/packages/php-console-laravel-service-provider)[dereuromark/cakephp-whoops

Whoops error handler for CakePHP

1492.4k1](/packages/dereuromark-cakephp-whoops)

PHPackages © 2026

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