PHP is very nice and lovely programming language, if you work with other people having good code is important.
Comment & Document
- Comments are very important because people understand why you are using certain function or block of code.
- So adding comments above section of code should be better. After providing document of that code that is really nice.
Give Meaningful names into Variables, Functions and Classes
- Given meaning full names in to variable because other programmers understand very easily
Example: $uname = ’’sudhakar’’; //not understand
Example: $userName = “sudhakar”; //every on easily understand
2. Function names and class names must and should give related work functionality
i) User registration somebody given
“user ()” or “user_r()” // these are not understand easily
Important Note: every one must and should follow only one format of total project either camelCase or underscore
Example: userRegistration or user_Registration //…
View original post 110 more words