What Is PHP and write your First Program?

Share:
PHP is a server-side scripting language. that is used to develop Static websites or Dynamic websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for Personal Home Pages.

PHP scripts can only be interpreted on a server that has PHP installed.

The client computers accessing the PHP scripts require a web browser only.

A PHP file contains PHP tags and ends with the extension ".php"

What Is PHP File?

1.     PHP files can contain text, HTML, CSS, JavaScript, and PHP code
2.     The PHP code is executed on the server, and the result is returned to the browser as plain HTML
3.     PHP files have the extension ".php"

What Can PHP Do?

1.     PHP can generate dynamic page content
2.     PHP can create, open, read, write, delete, and close files on the server
3.     PHP can collect form data
4.     PHP can send and receive cookies
5.     PHP can add, delete, modify data in your database
6.     PHP can be used to control user access
7.     PHP can encrypt data

Why PHP?

1.     PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
2.     PHP is compatible with almost all servers used today (Apache, IIS, etc.)
3.     PHP supports a wide range of databases
4.     PHP is free. Download it from the official PHP resource: www.php.net
5.     PHP is easy to learn and runs efficiently on the server side



PHP Hello world
The program shown below is a basic PHP application that outputs the words “Hello World!” When viewed in a web browser.



<?php
echo "Hello world";
?>


Output:
Hello world

No comments