Hi, I have been now programming in php for quite a few years. But I suck at commenting my code. Now I want to change that and I am trying to find out when the best practices are for commenting php code. Any help?
One best method to determine where to comment the code is as below: Look at your code and for a min consider that you have not developed it, now try to understand it. When you get problem to understand just comment those code. Hope this helps.
well surely there is some form of style ie what to write in comments at the beginning of functions, classes and at the top of each file which should be independent from the actual code.