Introduction of PHP | PHP Tutorial

PHP Introduction

Initially, it was given the short name of the word "Personal Home" page but later it came to be called "Hypertext Preprocessor". It is a server-side scripting language that is designed by a web developer. It is used in dynamic web page design. It is an open-source language, so you can download PHP Download from the given link without charge.

What is PHP ?

This language was prepared by Rasmus Lerdorf in 1994, its first version php 1.0, was brought to the market on 8 J0UNE 1995, after which several modifications were made in it, php 2.0, 3.0, etc. versions were brought in a fixed time interval. The latest version of php 8.1.0 Beta 1 is running which was released on 22 July 2021.

What is PHP?

The full name of PHP is Hypertext Preprocessor. It is a server-side scripting language with the help of which dynamic web pages can be created. PHP is a widely used, open-source scripting language.

Why Use PHP Language?

PHP language works on the server side, that is, it works between the browser and the server. It has the following characteristics:

Advantages of PHP :

1) Run on various platforms:

It can be easily run in any type of operating system like Windows, Mac, Linux, Unix, Ubuntu, etc.

2) Simple Scripting Language:

This is a server-side scripting language, and its coding is similar to C, C++, Java, JavaScript, etc., so the programmer does not have to work hard for programming in this language.

3) Compatible with today's server:

It supports currently used servers like IIS, Apache, etc.

4) Free and Open Source:

PHP is a free and open-source language, so there is no charge to download it. Therefore, without charge, you can download it directly by clicking on the given link and going to the PHP Download webpage.

5) Database Support:

PHP supports many database languages, thereby eliminating dependence on any one type of database language.

6) PHP Use with HTML:

It can be easily used with HTML code i.e. it is automatically installed with HTML. Therefore, in the editor in which the coding of HTML is being done, it can also be coded, for this, it has to be saved by writing .php in the extension of the file.

7) More Secure:

The modern version of PHP has been made even more secure, in its 8.0 beta version many security features have been added as compared to the previous version.

How to use PHP

To use PHP coding with HTML, all php code is written under the <?php ......?> tag.

PHP Syntax

<?php // Here start PHP Tag
/* ........ Write Php Code
// End PHP Tag ?>


<?php // starting point of PHP code
    //all php code here
 ?> <!-- Ending point of php code -->

Question 1: Write a PHP program to print the Hello word?

<?php // open tag

echo "hello world"; // print string

?> <!-- closing tag -->

save and run this program to your browser and see the output - hello word.

What Can PHP Do?

  • PHP can generate the dynamic page content.
  • PHP can create, open, read, write, delete, and close files on the server.
  • PHP can collect form data, and PHP can send and receive cookies.
  • PHP can add, delete, and update data in your database.
  • PHP can be used to control user access.
  • PHP can encrypt data.

With PHP you are not limited to outputting HTML. You can output images, PDFs, files, and even Flash movies. You can also output any text, such as HTML and XML.

Post a Comment