at path:ROOT / clients / vendor / filp / whoops / README.md
run:R W Run
DIR
2026-04-08 19:42:35
R W Run
70 By
2026-04-08 19:30:15
R W Run
1.95 KB
2026-04-08 19:30:14
R W Run
946 By
2026-04-08 19:30:14
R W Run
1.02 KB
2026-04-08 19:30:14
R W Run
5.85 KB
2026-04-08 19:30:14
R W Run
304 By
2026-04-08 19:30:15
R W Run
error_log
📄README.md
1# whoops
2PHP errors for cool kids
3
4[![Total Downloads](https://img.shields.io/packagist/dm/filp/whoops.svg)](https://packagist.org/packages/filp/whoops)
5[![Latest Version](http://img.shields.io/packagist/v/filp/whoops.svg)](https://packagist.org/packages/filp/whoops)
6[![Build Status on newer versions](https://github.com/filp/whoops/workflows/Tests/badge.svg)](https://github.com/filp/whoops/actions?query=workflow%3ATests)
7[![Build Status on older versions](https://travis-ci.org/filp/whoops.svg?branch=master)](https://travis-ci.org/filp/whoops)
8[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/filp/whoops/badges/quality-score.png?s=6225c36f2a2dd1fdca11ecc7b10b29105c8c62bd)](https://scrutinizer-ci.com/g/filp/whoops)
9[![Code Coverage](https://scrutinizer-ci.com/g/filp/whoops/badges/coverage.png?s=711feb2069144d252d111b211965ffb19a7d09a8)](https://scrutinizer-ci.com/g/filp/whoops)
10
11-----
12
13![Whoops!](http://i.imgur.com/0VQpe96.png)
14
15**whoops** is an error handler framework for PHP. Out-of-the-box, it provides a pretty
16error interface that helps you debug your web projects, but at heart it's a simple yet
17powerful stacked error handling system.
18
19## Features
20
21- Flexible, stack-based error handling
22- Stand-alone library with (currently) no required dependencies
23- Simple API for dealing with exceptions, trace frames & their data
24- Includes a pretty rad error page for your webapp projects
25- Includes the ability to [open referenced files directly in your editor and IDE](docs/Open%20Files%20In%20An%20Editor.md)
26- Includes handlers for different response formats (JSON, XML, SOAP)
27- Easy to extend and integrate with existing libraries
28- Clean, well-structured & tested code-base
29
30## Sponsors
31
32<a href="https://blackfire.io/docs/introduction?utm_source=whoops&amp;utm_medium=github_readme&amp;utm_campaign=logo"><img src="https://i.imgur.com/zR8rsqk.png" alt="Blackfire.io" width="254" height="64"></a>
33
34## Installing
35If you use Laravel 4, Laravel 5.5+ or [Mezzio](https://docs.mezzio.dev/mezzio/), you already have Whoops. There are also community-provided instructions on how to integrate Whoops into
36[Silex 1](https://github.com/whoops-php/silex-1),
37[Silex 2](https://github.com/texthtml/whoops-silex),
38[Phalcon](https://github.com/whoops-php/phalcon),
39[Laravel 3](https://gist.github.com/hugomrdias/5169713#file-start-php),
40[Laravel 5](https://github.com/GrahamCampbell/Laravel-Exceptions),
41[CakePHP 3](https://github.com/dereuromark/cakephp-whoops/tree/cake3),
42[CakePHP 4](https://github.com/dereuromark/cakephp-whoops),
43[Zend 2](https://github.com/ghislainf/zf2-whoops),
44[Zend 3](https://github.com/Ppito/zf3-whoops),
45[Yii 1](https://github.com/igorsantos07/yii-whoops),
46[FuelPHP](https://github.com/indigophp/fuel-whoops),
47[Slim](https://github.com/zeuxisoo/php-slim-whoops/),
48[Pimple](https://github.com/texthtml/whoops-pimple),
49[Laminas](https://github.com/Ppito/laminas-whoops),
50or any framework consuming [StackPHP middlewares](https://github.com/thecodingmachine/whoops-stackphp)
51or [PSR-7 middlewares](https://github.com/franzliedke/whoops-middleware).
52
53If you are not using any of these frameworks, here's a very simple way to install:
54
551. Use [Composer](http://getcomposer.org) to install Whoops into your project:
56
57 ```bash
58 composer require filp/whoops
59 ```
60
611. Register the pretty handler in your code:
62
63 ```php
64 $whoops = new \Whoops\Run;
65 $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
66 $whoops->register();
67 ```
68
69For more options, have a look at the **example files** in [`examples/`](./examples) to get a feel for how things work. Also take a look at the [API Documentation](docs/API%20Documentation.md) and the list of available handlers below.
70
71You may also want to override some system calls Whoops does. To do that, extend `Whoops\Util\SystemFacade`, override functions that you want and pass it as the argument to the `Run` constructor.
72
73You may also collect the HTML generated to process it yourself:
74
75```php
76$whoops = new \Whoops\Run;
77$whoops->allowQuit(false);
78$whoops->writeToOutput(false);
79$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
80$html = $whoops->handleException($e);
81```
82
83### Available Handlers
84
85**whoops** currently ships with the following built-in handlers, available in the `Whoops\Handler` namespace:
86
87- [`PrettyPageHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/PrettyPageHandler.php) - Shows a pretty error page when something goes pants-up
88- [`PlainTextHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/PlainTextHandler.php) - Outputs plain text message for use in CLI applications
89- [`CallbackHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/CallbackHandler.php) - Wraps a closure or other callable as a handler. You do not need to use this handler explicitly, **whoops** will automatically wrap any closure or callable you pass to `Whoops\Run::pushHandler`
90- [`JsonResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/JsonResponseHandler.php) - Captures exceptions and returns information on them as a JSON string. Can be used to, for example, play nice with AJAX requests.
91- [`XmlResponseHandler`](https://github.com/filp/whoops/blob/master/src/Whoops/Handler/XmlResponseHandler.php) - Captures exceptions and returns information on them as a XML string. Can be used to, for example, play nice with AJAX requests.
92
93You can also use pluggable handlers, such as [SOAP handler](https://github.com/whoops-php/soap).
94
95## Authors
96
97This library was primarily developed by [Filipe Dobreira](https://github.com/filp), and is currently maintained by [Denis Sokolov](https://github.com/denis-sokolov). A lot of awesome fixes and enhancements were also sent in by [various contributors](https://github.com/filp/whoops/contributors). Special thanks to [Graham Campbell](https://github.com/GrahamCampbell) and [Markus Staab](https://github.com/staabm) for continuous participation.
98