|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54548 needed a way to define multiple error handlers
Submitted: 2011-04-16 20:15 UTC Modified: 2021-08-05 14:08 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: giorgio dot liscio at email dot it Assigned: cmb (profile)
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.3.6 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
12 + 48 = ?
Subscribe to this entry?

 [2011-04-16 20:15 UTC] giorgio dot liscio at email dot it
hi, since a lot of [debug]frameworks/libs relies on set_error_handler would be nice to have a way to provide a stack of error handlers (like spl autoload stack, ticks etc)

register_error_handler($callback, /* prepend */ TRUE | FALSE)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-19 12:06 UTC] alex dot schuch at gmx dot de
I have encountered the very same problem.

set_error_handler() returns the previously installed error handler, so maybe it can be called using call_user_func() somehow. The example (PHP manual) of set_error_handler() actually stores the previously installed error handler but does not use it.
 [2021-08-05 14:08 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-08-05 14:08 UTC]
Given there was no traction on this ticket for more than ten
years, and that it is already possible to call the previously set
error handler from your own error handler, I'm closing this as

If anybody still feels this would be a valuable feature addition,
please pursue the RFC process[1].

[1] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 08 01:05:45 2022 UTC