PHPackages                             panrafal/php-error - 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. panrafal/php-error

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

panrafal/php-error
==================

Better error reporting for PHP, and prettier too! Fork of original PHP-Error by Joseph Lenton better suited for production environments.

1.0.x-dev(12y ago)65.9kBSD-3-ClausePHPPHP &gt;=5.3.0

Since Feb 19Pushed 12y ago4 watchersCompare

[ Source](https://github.com/panrafal/PHP-Error)[ Packagist](https://packagist.org/packages/panrafal/php-error)[ Docs](https://github.com/panrafal/PHP-Error)[ RSS](/packages/panrafal-php-error/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Error | Improve Error Reporting for PHP
===========================================

[](#php-error--improve-error-reporting-for-php)

**This is a fork of original PHP-Error by Joseph Lenton better suited for production environments.**

It gives you the power of catching crtical and trivial errors in a coherent way. You can log every error in your app, and show your users a meaningfull error page. At the same time, you can configure the server to show you, the developer, full stack trace and all other PHP-Error goodness.

The fork was done before Joseph added ACE remote file editing, and it will be kept this way.

---

PHP errors are not good enough for development, it's as simple as that. This aims to solve this.

[![Better Error Message](https://camo.githubusercontent.com/576e5155fd10c40af900bc1ad90bf817223582ad0cf6d2fb00f50ad477de802d/687474703a2f2f692e696d6775722e636f6d2f31473737492e706e67)](https://camo.githubusercontent.com/576e5155fd10c40af900bc1ad90bf817223582ad0cf6d2fb00f50ad477de802d/687474703a2f2f692e696d6775722e636f6d2f31473737492e706e67)

When an error strikes, the page is replaced with a full stack trace, syntax highlighting, and all displayed to be readable.

### Works with Ajax too!

[](#works-with-ajax-too)

If the server errors during an ajax request, then the request is paused, and the error is displayed in the browser. You can then click to automatically retry the last request.

[![ajax server stack trace](https://camo.githubusercontent.com/b7573920c8e3e1dd3aa8891a2b7c3a52b300534a8199da1cd73f18c9b9f707ca/687474703a2f2f692e696d6775722e636f6d2f57526775672e706e67)](https://camo.githubusercontent.com/b7573920c8e3e1dd3aa8891a2b7c3a52b300534a8199da1cd73f18c9b9f707ca/687474703a2f2f692e696d6775722e636f6d2f57526775672e706e67)

This requires no changes to your JavaScript, and works with existing JS libraries such as jQuery.

Check out the [project homepage](http://phperror.net) for a live demo.

Features
--------

[](#features)

- trivial to use, it's just one file
- errors displayed in the browser for normal and ajaxy requests
- ajax requests are paused, allowing you to automatically re-run them
- makes errors as strict as possible (encourages code quality, and tends to improve performance)
- code snippets across the whole stack trace
- provides more information (such as full function signatures)
- fixes some error messages which are just plain wrong
- syntax highlighting
- looks pretty!

Getting Started
---------------

[](#getting-started)

- [Download](http://phperror.net/download/php_error.php), it's just one file.
- Place it in your project.
- import php\_error.php
- call \\php\_error\\reportErrors()

```
