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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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)

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC