PHP Programming Introduction

Spread the love

In PHP programming introduction we will see what exactly is PHP, where it is used for and its features. PHP is widely used for web application development. So before beginning with PHP programming introduction, first let us see what is a web application and then we will see how we can use PHP to develop a web application.

What is a Web application?

We have two types of applications, one which runs your computer and only you will be able to use that application which is called as the Desktop application.

Second is when an application is connected to the internet and more than one person can able to access and use then such application we will be called as the Web application.

Any application which runs on a web server is simply called as a web application. Web server is a computer connected to the internet and either located in your home or somewhere else in the world, having some extra functionalities to process requests sent via the internet. After processing web application will generate output and send back to the user who sends the request and shows output in the browser.

Take an example of Facebook. Facebook website is present on a computer owned by a Facebook company. That computer having the higher processing power and features is connected to the Internet and able to process many requests of users at a time. When you enter www.facebook.com in your browser, it searches the facebook.com on the internet and returns facebook home page to your browser.

Now let’s see about PHP.

PHP Programming Introduction:

The basic definition of PHP would be PHP is server-side scripting language which is used to develop dynamic web applications.

PHP is one of the computer languages which does processing on the server and generate HTML output after processing. Hence PHP is called as the server-side scripting language. We write code in PHP, place that code in web server. After running PHP code it will generate HTML output to show on browsers.

PHP Programming Introduction examples:

Let’s see one simple example written in PHP and it’s output.

<?php

     echo "Hello From PHP";

?>

Here <?php ?> is syntax for PHP. We will look into it for more details.

Output in browser:

Hello From PHP

As you see in the output, it’s displaying the string “Hello From PHP“.

If you are using Google  Chrome browser, just right click on output “Hello From PHP” and select “Inspect“, as a result, a small window will open at the bottom of the page and you may see HTML tags with the text “Hello From PHP”.

HTML output generated is:

<html>
     <body>
          Hello from PHP
     </body>
</html>

Similarly, we can process other operations also and generate HTML output.
You can also embed PHP in HTML code and vice versa.

What is full form of PHP?

PHP stands for “PHP: Hypertext Preprocessor“.

Who developed PHP?

PHP was developed by Rasmus Lerdorf, in 1994.

Some important features of PHP

  1. PHP can integrate with many popular databases like Oracle, MySql, PostgreSQL, Sybase etc.
  2. PHP’s syntax is like C language.
  3. PHP can handle complex forms submissions and store form data in the database.
  4. It sets and access cookies and session variables.
  5. It can encrypt data and restrict access to pages as per requirement.

[ad name=”Responsive Text”]

Characteristics of PHP

  1. Secure
  2. Simple
  3. Efficient
  4. Flexible

Use of PHP

  1. PHP is used to make web application from simple to complex level.
  2. PHP can be used to make to handle database applications.
  3. PHP is used to encrypt and decrypt data.


Spread the love

Leave a Comment