php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69654 Add E_DEBUG and E_USER_DEBUG constants
Submitted: 2015-05-18 14:18 UTC Modified: 2017-01-02 08:56 UTC
From: a dot cobest at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: Irrelevant OS: any
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: a dot cobest at gmail dot com
New email:
PHP Version: OS:

 

 [2015-05-18 14:18 UTC] a dot cobest at gmail dot com
Description:
------------
All loggers and project has [DEBUG] mode. Using E_NOTICE as debug identification is incorrect  for dev-messages because in production dev-message must be ignoring and in dev-mode all messages (notices and debugs) mixed in mess.  

Some extensions can use the constant E_DEBUG in their dev-messages. For example, MongoLog use E_NOTICE for debugging. It is not convenient.

Test script:
---------------
<?php

// ...

trigger_error("Connection with DB established", E_DEBUG);

// ...

Expected result:
----------------
If bit E_DEBUG present in error_reporting:

Debug: Connection with DB established in ...

Actual result:
--------------
The constant E_DEBUG doesn't exists

Patches

req69654.E_USER_DEBUG.E_DEBUG.patch (last revision 2015-05-19 08:37 UTC by a dot cobest at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-18 14:19 UTC] a dot cobest at gmail dot com
-Summary: Add E_DEBUG and E_DEBUG constant +Summary: Add E_DEBUG constant
 [2015-05-18 14:19 UTC] a dot cobest at gmail dot com
duplicate E_DEBUG in title
 [2015-05-18 14:21 UTC] a dot cobest at gmail dot com
May be make sense make two constants: E_DEBUG and E_USER_DEBUG
 [2015-05-18 14:39 UTC] a dot cobest at gmail dot com
MongoLog from MongoDB extension (not monolog package)
 [2015-05-18 16:54 UTC] stas@php.net
-Package: PHP Language Specification +Package: Scripting Engine problem
 [2015-05-19 08:39 UTC] a dot cobest at gmail dot com
-Summary: Add E_DEBUG constant +Summary: Add E_DEBUG and E_USER_DEBUG constants
 [2015-05-19 08:39 UTC] a dot cobest at gmail dot com
Add E_USER_DEBUG constant
 [2015-05-19 08:40 UTC] a dot cobest at gmail dot com
Patch req69654.E_USER_DEBUG.E_DEBUG.patch for master branch
 [2017-01-02 08:56 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2017-01-02 08:56 UTC] krakjoe@php.net
Closing with PR, no RFC materialized.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC