PHP Introduction

What is PHP?

  • PHP stands for Hypertext Preprocessor.
  • It is a server side programming language- it runs on a web server.
  • The end result of running PHP script on server is always pure HTML.
  • PHP is a loosely typed language, meaning there is no need to explicitly create, typecast, or destroy a variable, although you are not prevented from doing so.
  • PHP is a powerful language for creating dynamic and interactive web pages.
  • It is widely used, free and easy to deploy.
  • When HTML scripts in file are saved as a file with .php extension, it becomes a PHP file. That is, an HTML file with PHP script embedded in it is a PHP file.
  • PHP scripts must be run on web server, otherwise they won’t work.

PHP Programming


What PHP can do?

Simply, a lot! PHP can

  1. Create pages dynamically
  2. Create, open, read, write, delete, and close files on the server
  3. Collect and manipulate form data
  4. Interface with databases
  5. Create and manipulate Adobe Flash and Portable Document Format (PDF) files.
  6. Be used to control authentication based user access.
  7. Tightly integrate with a wide array of credit-card processing solutions.

In brief, PHP doesn’t limit your scope to play on the web.

PHP offers almost 200 plus native libraries for disposal, collectively contains well over 1000 functions in addition to thousands of third party extensions.

PHP has a large number of Database supports,  native support is offered for more than 25 database products including Microsoft SQL Server, MySQL, Oracle, PostgreSQL, Sybase, IBM DB2 and many a more.

PHP’s flexible string-parsing capabilities make it a candidate for being chosen by millions of developers worldwide.

PHP offers both procedural programming as well as the Object-oriented paradigm, though PHP was originally a solely functional language.


A few PHP rules to code in mind before starting PHP code

  1. PHP code is always enclosed by <?php and ?>.
  2. Every PHP statement must end with a semicolon (;).
  3. It’s a good idea to name a file on server with .php extension, if the file contains any PHP code.
  4. PHP variable names must begin with a dollar sign ($).
Check Page Rank