Most Important Tips for Coding In PHP


phpguidance

PHP is very nice and lovely programming language, if you work with other people having good code is important.

Comment & Document

  1. Comments are very important because people understand why you are using certain function or block of code.
  2.  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

  1.  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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s