php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76318 Unclear statement in set_error_handler docs
Submitted: 2018-05-09 18:12 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: teo8976 at gmail dot com Assigned:
Status: Open Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: teo8976 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-05-09 18:12 UTC] teo8976 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.set-error-handler
---

This sentence:
"""
The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called
"""

is ambiguous. It  is unclear whether the part that says "raised in the file where set_error_handler() is called" applies only to E_STRICT, or to all the mentioned error levels.

That is, one could interpret:

A)
""
The following error types cannot be handled with a user defined function: 
- E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING (wherever they are raised) 
- most of E_STRICT raised in the file where set_error_handler() is called
""

or

B)
""
The following error types cannot be handled with a user defined function: 
{E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING  and most of E_STRICT}
raised in the file where set_error_handler() is called
""

From what I've been able to test, it seems that the truth is (A)

This must be made clearer.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Fri Oct 19 15:01:26 2018 UTC