# [Proposal] New error type E_DEPRECATED

- Thread: https://externals.io/message/2754
- Original archive: https://news-web.php.net/php.internals/2754
- Started by Davey on 2003-06-25T02:52:18+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2754 — Davey — 2003-06-25T02:52:18+00:00

URL: https://externals.io/message/2754#2754

Hey,

I was thinking that perhaps implementing a new error type, `E_DEPRECATED` 
might be a good idea for helping to advocate the deprecation of 
functions and such.

It would simply work in that it shows a "notice" type message, that is 
only shown under `E_ALL` and if `E_DEPRECATED` is appended to the 
error_reporting php.ini line (or via `error_reporting()` function). 
Perhaps the message could link to documentation on why it has been 
deprecated/what it has been deprecated in favour of.

It was also noted when discussed with others, that the PHP Doc team can 
automatically detect and document deprecated functions.

The only thing this would really break is people _not_ using the 
constants, in which case they've been repeatedly warned not to do so 
ever since the last change (4.0.0).

It was suggested that perhaps make `E_DEPRECATED` 2048 (Add
#define `E_DEPRECATED` (1<<11L)) then add `E_DEPRECATED` to the
#define `E_ALL` (E_ERROR | `E_WARNING` | `E_PARSE` | `E_NOTICE` | `E_CORE_ERROR` | 
 `E_CORE_WARNING` | `E_COMPILE_ERROR` | `E_COMPILE_WARNING` | `E_USER_ERROR` | 
 `E_USER_WARNING` | `E_USER_NOTICE` | E_DEPRECATED)

- Davey
