Req #69654 [Opn]: Add E_DEBUG constant

[email protected] ("a dot cobest at gmail dot com")
Newsgroups php.standards
Message-ID <[email protected]>
Edit report at https://bugs.php.net/bug.php?id=69654&edit=1

 ID:                 69654
 User updated by:    a dot cobest at gmail dot com
 Reported by:        a dot cobest at gmail dot com
-Summary:            Add E_DEBUG and E_DEBUG constant
+Summary:            Add E_DEBUG constant
 Status:             Open
 Type:               Feature/Change Request
 Package:            PHP Language Specification
 Operating System:   any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

duplicate E_DEBUG in title


Previous Comments:
------------------------------------------------------------------------
[2015-05-18 14:18:13] 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


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69654&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.