Code-only/Unexplained answers are low-value and miss an opportunity to educate/empower the OP as well as thousands of future researchers. Please [edit] your answer to include one or more of the following non-code insights: an explanation of how/why the code works, fringe case considerations/caveats/pitfalls, reasons why this snippet may be more ideal than another technique, and relevant documentation links. If you feel this is the best possible solution, then be compelling about why. Help researchers to identify the solution that they should use among the solutions that they can use.
...phew, 5 characters left!
Whether or not my suggested comment is ideal, it is important that we explain why answerers should post more than code. We need to find a clear, poignant message which:
- explains that they are not only speaking to the OP, and
- has a high success rate of spurring a positive edit, and
- will trigger them to adopt this mantra and put them on a path to writing better/complete answers without any new external motivation.
I, personally, do a fair amount of duplicate hammering in the php tag pool. I care about the quality of pages that I put forward as the dupe target. When I have a choice between multiple duplicates, I am far less likely to nominate a page with unexplained answers to a new question because the goal is to educate the new OP. So, in these cases, code-only answers impact my efforts and slow me down while I search for a page with high quality insights.
The whole community improves when we have better crafted content in more places. The more contributors we have who are posting complete answers, the more normalized the practice becomes -- so grows a better community.