PHPackages                             ankane/exceptional-php - 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. ankane/exceptional-php

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

ankane/exceptional-php
======================

The power of Exceptional for PHP

4853013PHP

Since Sep 26Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ankane/exceptional-php)[ Packagist](https://packagist.org/packages/ankane/exceptional-php)[ RSS](/packages/ankane-exceptional-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Exceptional PHP
===============

[](#exceptional-php)

The power of [Exceptional](http://getexceptional.com) for PHP

Super simple setup
------------------

[](#super-simple-setup)

```
require "path/to/exceptional.php";
Exceptional::setup("YOUR-API-KEY");
```

You can turn off exception notifications by passing an empty string as the API key. This is great for development.

```
if (PHP_ENV == "production") {
  $api_key = "YOUR-API-KEY";
}
else {
  $api_key = "";
}

Exceptional::setup($api_key);
```

You can turn on SSL by setting the second parameter to `true`.

```
Exceptional::setup($api_key, true);
```

Filtering sensitive data
------------------------

[](#filtering-sensitive-data)

You can blacklist sensitive fields from being submitted to Exceptional:

```
Exceptional::setup($api_key);
Exceptional::blacklist(array('password', 'creditcardnumber'));

```

Exceptions and errors
---------------------

[](#exceptions-and-errors)

Exceptional PHP catches both errors and exceptions. You can control which errors are caught. If you want to ignore certain errors, use `error_reporting()`. Here's a common setting:

```
error_reporting(E_ALL & ~E_NOTICE);  // ignore notices
```

Custom error and exception handlers are supported - see examples/advanced.php.

Fatal and parse errors are caught, too - as long the setup file parses correctly.

404 support
-----------

[](#404-support)

Add the following code to your 404 handler to track 404 errors:

```
throw new Http404Error();
```

Send extra data with your exceptions
------------------------------------

[](#send-extra-data-with-your-exceptions)

```
$context = array(
    "user_id" => 1
);
Exceptional::context($context);
```

See the [Exceptional documentation](http://docs.getexceptional.com/extras/context/) for more details.

Controller + action support
---------------------------

[](#controller--action-support)

You can include the controller and action names in your exceptions for easier debugging.

```
Exceptional::$controller = "welcome";
Exceptional::$action = "index";
```

Proxy server
------------

[](#proxy-server)

You can send exceptions through proxy server (no support for authentication).

```
Exceptional::proxy($host, $port);
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/220358?v=4)[Andrew Kane](/maintainers/ankane)[@ankane](https://github.com/ankane)

---

Top Contributors

[![till](https://avatars.githubusercontent.com/u/27003?v=4)](https://github.com/till "till (24 commits)")[![ankane](https://avatars.githubusercontent.com/u/220358?v=4)](https://github.com/ankane "ankane (8 commits)")[![lsimoneau](https://avatars.githubusercontent.com/u/31768?v=4)](https://github.com/lsimoneau "lsimoneau (4 commits)")[![zackkatz](https://avatars.githubusercontent.com/u/870979?v=4)](https://github.com/zackkatz "zackkatz (1 commits)")[![paulca](https://avatars.githubusercontent.com/u/1229?v=4)](https://github.com/paulca "paulca (1 commits)")[![jrbasso](https://avatars.githubusercontent.com/u/26548?v=4)](https://github.com/jrbasso "jrbasso (1 commits)")[![shime](https://avatars.githubusercontent.com/u/703563?v=4)](https://github.com/shime "shime (1 commits)")

### Embed Badge

![Health badge](/badges/ankane-exceptional-php/health.svg)

```
[![Health](https://phpackages.com/badges/ankane-exceptional-php/health.svg)](https://phpackages.com/packages/ankane-exceptional-php)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M263](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M317](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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