Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6038675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:15:24+00:00 2026-05-23T06:15:24+00:00

From my understanding of PHP documentation, setting custom error handler (which cannot catch all

  • 0

From my understanding of PHP documentation, setting custom error handler (which cannot catch all the errors) deactivates the default php error handler (which I guess can catch all the errors:).

If this is correct, is there any purpose of setting custom error handler? I always keep error_reporting(-1), so I should get all errors in the error log anyway, right?

As for the user experience, I cannot see the purpose of making these errors manifest in a custom way – why would you ever want users to see them? In production I always set display_errors to off.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:15:25+00:00Added an answer on May 23, 2026 at 6:15 am

    Setting a custom error handler is for setting a catch-all handler that takes care of the errors that aren’t handled elsewhere. It can catch all errors, except for the ones where your script isn’t ran at all (such as fatal syntax errors).

    I should also point out that if you return false from your error handling function, then the built-in PHP error handler will step in.

    You may want this for special logging of any specific kinds of exceptions in your application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using TortoiseHg 0.5 (which includes Mercurial 1.0.2) on Vista64. My understanding from the
from my understanding, require pastes code into the calling php file. what if you
PHP 5 introduces the magic method __get() and __set(). From my understanding it is
I'm having serious issues understanding PHP classes from a book. They seem very difficult.
I'm from a PHP background. All I know is that web server handles the
I have the following code from Codeigniter index.php My understanding is that, If /
From my understanding, (.)(?<!\1) should never match. Actually, php's preg_replace even refuses to compile
From my understanding the XMPP protocol is based on an always-on connection where you
From my understanding of the CSS spec, a table above or below a paragraph
From my understanding, Lua is an embeddable scripting language that can execute methods on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.