What is PHP? An Intrduction

The PHP: Hypertext Preprocessor (PHP) is known as a programming language that enables web developers creating dynamic content that communicates with the data source.

PHP is an open-source program, that means it is available for free on the Web. PHP can also be used across many platforms, such as Linux, many variations of the Unix system, Mac OS X, and Microsoft Windows.

PHP is a complete programming language and can be used for functions such as server-side scripting (using a web server to fulfill a user’s request by running a script directly on the web server like Apache, to generate dynamic HTML pages).

PHP is actually made to use for developing web-based software programs.

This PHP tutorial enables you to build your foundation with PHP.

A few salient features of PHP

  • PHP is a recursive abbreviation for “PHP: Hypertext Preprocessor“.
  • PHP is a server-side scripting language which is embedded in HTML. It can be used to manage dynamic content, databases, session tracking, building e-commerce sites and powers the web applications.
  • The WordPress is a major example developed in PHP besides many others.
  • PHP can work with many popular databases including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
  • PHP is fast in its execution, particularly when compiled as an Apache module on the Unix OS. The MySQL server once started, executes even very complex queries with huge resultsets in record time.
  • The PHP works with many major protocols such as POP3, IMAP, and LDAP. The PHP4 included support for Java and distributed object architectures (COM and CORBA), making n-tier development possible.
  • PHP Syntax is like the C language.

General uses of PHP

  • PHP carries out system functions, i.e. from the files in a system it can create, open, read, write, and close them.
  • PHP works with forms, i.e. collect data from the web forms, can save data to a file. Through email, you can send and return data to the user.
  • You may add, delete, update elements or rows in your database through PHP.
  • Create and access cookie variables and delete cookies.
  • PHP can encrypt data in different formats. Details in coming chapters how and which formats.

Features of PHP

5 significant features that make PHP stronger:

  1. Simplicity
  2. Efficiency
  3. Security
  4. Flexibility
  5. Familiarity

The audience of this tutorial

This tutorial is made for those who’re not fully aware of PHP basics, however, they have knowledge of computer programming.

Requirements for PHP Tutorial

Before continuing with this guide, you need to have at least the basic knowledge of computer programming, Internet, DBMS, and MySQL database etc.

PHP Hello World Example

To give a taste of PHP, let us first start with a simple PHP script. Since “Hello, World!” is a general example, first of all, we will create a friendly little “Hello, World!” script.

As mentioned earlier, PHP is also embedded in HTML. That means, in your normal HTML you may have PHP statements like this:

Experience this example online

The result of the above code is:

Hello, World!

If you go through the output in above example, you’ll notice that the PHP code isn’t there in the file sent from the server to your browser. All of the PHP code in the page is processed in web server while the only thing returned to the client from the Web server is pure HTML as the output.

Topics in this Tutorial

  • Set up PHP environment
    • Install PHP on Linux or Unix
    • Install PHP on Windows NT/2000/XP IIS
    • Install PHP on Windows NT/2000/XP Apache
  • PHP Syntax Basics
  • Variables in PHP
  • PHP Operators
  • PHP Print Statement
  • PHP echo
  • PHP if..else Statement
  • PHP Switch Case
  • PHP For Loop
  • PHP While Loop
  • PHP Strings
  • PHP Array
  • PHP Date
  • PHP Functions
  • PHP Class
  • PHP Sessions
  • PHP Cookies
  • PHP and MySQL
    • PHP and MySQL insert, delete, update

You may find topics in the left navigation across the PHP Tutorials as well.