To PHP or Not to PHP

By Sunny Kumar Gupta

Hey friends, Today what I would like to focus on is: The simplicity of PHP and why you should learn it as a developer. If you are an HTML developer who does not know Server Side Scripting, now is the time you had a go at PHP. It, as you already know, is a server side scripting language, which unlike other languages like Javascript, does not show ‘the code’ of your application even in the ‘View Source’ page. What PHP does is, it parses (executes) the codes on the server itself. i.e. It only sends the output of the script to the browser which has many advantages:

  • Less prone to hackers, since they cannot know your variables/coding methodology.
  • Reduction in the amount of data being sent over the network, thereby saving you a lot of bandwidth in the long run.
  • Reduces the load off the browser, to make the website load faster. (Javascript on the other-hand, has to be parsed by the client machine.)
  • Allows data to be stored in databases via internal connection links. (SECURITY ++)

An immediate response to my statement above would be that what difference does it make, whoever does the math, at the end of the day the code HAS to be executed, client or server, how does it matter? This is where the power of a server comes in. The client system might be very advanced, but it always has many applications running it. A server on the other hand is built to handle thousands of requests per microsecond. Hence the server executes the PHP script as if it were a static page in itself. Let us see how a PHP script is executed. Any script written in PHP needs to be starting with a

 

<?php

 

and end with a

 

?>

 

although tweaking some settings you can change the way it works, this is the standard format for declaring a script. Any code written in between is executed by the compiler while everything outside is left untouched. Go ahead play with a few functions from the PHP Library and let the sparks fly! If you’ve heard enough, and want to start with some PHP, I would suggest you to refer PHP.net manual. It is a great website for beginners. OR If you still don’t think PHP is worth a try, have a look around PHP Open Central, they have a huge resource for PHP developers, beginner and advanced.

Its been a long time that I’ve been coding in PHP. I’ve been to forums, asked doubts in my initial days, helped others with some basic errors, etc. I can be contacted via my blog http://vircafe.com.

Article Source: http://EzineArticles.com/?expert=Sunny_Kumar_Gupta

http://EzineArticles.com/?To-PHP-or-Not-to-PHP&id=6217038

 

 

You can leave a response, or trackback from your own site.

Leave a Reply