Categorized | News

Error Handling Ideas from PHP mag

Posted on 06 August 2003 by Demian Turner

If you are not fortunate enough to be a subscriber to PHP magazine, you may want to take a look at this great error handling class presented last issue by  Peter James.

The class introduces a few interesting programming ideas, like inner functions and using them to override PHP’s default error handling.

Bookmark and Share

3 Comments For This Post

  1. tychay Says:

    At first glance the inner function idea seems like a lot of
    work to get around a feature built into PHP.

    He could have just done:

    function start_handler() {

    Of course he has an excludes array and a line number counter
    which are static parameters so you may need to revise the code

    function start_handler() {

    Someone tell me why I need an inner function and two

    Methinks some people need to spend more time reading the
    (very incomplete!) documentation at!

  2. petej Says:

    If you read the documentation in the class *and* on for set_error_handler(), you will see that it did not accept anything but a standard function name before php 4.3… And this was written well before php 4.3.


  3. petej Says:

    Oops, I just noticed that the version posted here has no comments.

    Take a look at

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up