FAQ
When compiled with #ifdef ZTS, zend_error invokes pthread_get_specific.

The performance analyzer tool indicated that zend_error was being
invoked during normal processing of requests, even though no error
messages were logged. The source of these calls were E_NOTICE
messages.

Please review the attached patch which introduces a REPORT_ERROR macro
to avoid invoking the zend_error function when the error reporting
level indicates that E_NOTICE messages are not to be reported.
Although, all these codepaths are not executed, I guarded all E_NOTICE
messages using the REPORT_ERROR macro.

thanks,
arvi

Search Discussions

  • Derick Rethans at Oct 30, 2009 at 2:18 pm

    On Fri, 30 Oct 2009, Arvind Srinivasan wrote:

    When compiled with #ifdef ZTS, zend_error invokes pthread_get_specific.

    The performance analyzer tool indicated that zend_error was being
    invoked during normal processing of requests, even though no error
    messages were logged. The source of these calls were E_NOTICE
    messages.

    Please review the attached patch which introduces a REPORT_ERROR macro
    to avoid invoking the zend_error function when the error reporting
    level indicates that E_NOTICE messages are not to be reported.
    Although, all these codepaths are not executed, I guarded all E_NOTICE
    messages using the REPORT_ERROR macro.
    This is a bad idea, because the error handler does other things as well.
    This is quite a bit of a BC break.

    regards,
    Derick
  • Arvind Srinivasan at Oct 31, 2009 at 9:48 am
    This is a bad idea, because the error handler does other things as well.
    If the error reporting level indicates that the user is not interested
    in E_FOO, why would there be an expectation that zend_error be invoked
    for E_FOO messages?

    Arvi
  • Alexey Zakhlestin at Oct 31, 2009 at 10:09 am

    On 31.10.2009, at 12:48, Arvind Srinivasan wrote:

    This is a bad idea, because the error handler does other things as
    well.
    If the error reporting level indicates that the user is not interested
    in E_FOO, why would there be an expectation that zend_error be invoked
    for E_FOO messages?
    error_reporting setting is related to automatic reactions on errors
    only.
    but php provides additional means to get last-error manually which
    should work without relation to this setting

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedOct 30, '09 at 12:39p
activeOct 31, '09 at 10:09a
posts4
users3
websitephp.net

People

Translate

site design / logo © 2022 Grokbase