Jump to content

Recommended Posts

> 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?
 

Link to comment
https://forums.phpfreaks.com/topic/329165-what-is-e_user_deprecated-for/
Share on other sites

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?

  • Great Answer 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.