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


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to