Sometimes I come across questions and/or answers under the PHP tag (I'm sure the problem persists for other tags as well) that use deprecated functions. While some of this might be a result of new users (admittedly like myself) using outdated tutorials, etc., many are deprecated because they were asked/answered when the function was not deprecated. On these questions it seems less likely that a user will comment to point out that a function is deprecated.
I propose that StackOverflow display a warning above each of these questions/answers to notify the user that the function used is deprecated. Something like this:
Or, even simpler:
This question or answer may contain deprecated functions. Proceed with caution.
This could be instituted either via users flagging deprecated questions/answers. I'm not sure if it is possible, but it could also be instituted automatically by crawling questions and answers.
An admitted downside is that the user may just leave the page and not read on to see if there are any non-deprecated answers. But that's probably better than the user using the deprecated code, right? Also, many new users like myself often do not know which functions are deprecated. In those situations, I know I would appreciate knowing that an answer might be outdated.