rick645 Posted July 2 Share Posted July 2 > Because `E_DEPRECATED` can only be triggered by PHP itself, to indicate deprecated functionality in the PHP engine itself. For userland code (_including_ frameworks and libraries!) to trigger deprecation notices, you must use `E_USER_DEPRECATED`. > > BTW, you can add that to the `error_reporting` mask, too: > > ``` ini > error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_USER_DEPRECATED > ``` > _Originally posted by @weierophinney in [#98](https://github.com/zendframework/zend-mvc/issues/98#issuecomment-194395567)_ Anyway, it seems to me that by default E_USER_DEPRECATED is disabled. When (at what stage of development) do you usually prefer to keep it disabled? When do you usually prefer to enable it (error_reporting = ~E_USER_DEPRECATED & ...)? Maybe in pre-production/finishing stage? Quote Link to comment https://forums.phpfreaks.com/topic/329165-what-is-e_user_deprecated-for/ Share on other sites More sharing options...
requinix Posted July 2 Share Posted July 2 E_DEPRECATED and E_USER_DEPRECATED are the same thing, with the one difference that the former is used by the engine and the latter is used by trigger_error. So the question is in what environments do you care/not care about getting messages about using deprecated features and functionality? 1 Quote Link to comment https://forums.phpfreaks.com/topic/329165-what-is-e_user_deprecated-for/#findComment-1655687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.