Giter VIP home page Giter VIP logo

php-error's Introduction

PHP Error | Improve Error Reporting for PHP

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

Better Error Message

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!

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

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

Check out the project homepage for a live demo.

Do not use on a live site!

To help make development easier, this deliberately makes your code unsafe. External requests are allowed to change your code, it shows more about your site, gives you more info, and makes trivial errors fatal. All of that is awesome if you want to fix bugs in less time, but in production, it is totally unsafe.

seriously, only use this for development!

In case you forget, you can disable this in production using the 'php_error.force_disabled' php.ini option (see below).

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

  • Download, it's just one file.
  • Place it in your project.
  • import php_error.php
  • call \php_error\reportErrors()
    <?php
        require( 'php_error.php' );
        \php_error\reportErrors();
    ?>

Documentation

Advanced Features

  • customization
  • manually turn it on and off
  • run specific sections without error reporting
  • ignore files allowing you to avoid highlighting code in your stack trace
  • application files; these are prioritized when an error strikes!

Application Aware Stack Trace

php-error's People

Contributors

geczy avatar alexbilbie avatar rjkip avatar mrsimonbennett avatar pepamartinec avatar

Watchers

James Cloos avatar githow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.