When developers are stuck or need help on a piece of code they usually go to any given search engine and usually end up here. They see an answer that is "green" and has a high number compared to the rest they'd blindly use the code and will look over the fact that some of these answers are actually very outdated.
While this is still true for most cases there are some answers that use outdated but still valid code to resolve the situation.
I'm usually hanging around PHP questions, so let me give you an example:
https://www.google.nl/search?q=php+connect+to+mysql+stack+overflow
Results in:
http://stackoverflow.com/questions/20407699/php-connect-to-mysql-database
Now because a user might look for questions and prefer Stackoverflow's readability and clarity they might want to tag this site to the query.
There is nothing wrong with the question, noor the answer except the fact that using mysql_funcionname()
is very much depreciated.
Languages develop over time, new methods become available and old code might not work anymore. I think there should be a method to add a header to the post saying "this answer is valid to the question but is discouraged, see this link (linking to an newer answer or documentation) that shows the correct updated way.
Now I realize this is just 1 example, but I keep finding myself in a scenario where still comment on people not to use it. I'm quite sure this does not apply to PHP alone.
Now this is just an idea, I'm just asking to perhaps get a ball rolling.