Introduction to PHP

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. Originally created by Rasmus Lerdorf in 1994. It is also used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.

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

PHP Syntax  <?php...............?>

Features of PHP :

Performance : Script written in PHP executes much faster then those scripts written in other languages such as JSP & ASP.

Open Source Software : PHP source code is free available on the web, you can developed all the version of PHP according to your requirement without paying any cost.

Platform Independent : PHP are available for WINDOWS, MAC, LINUX & UNIX operating system. A PHP application developed in one OS can be easily executed in other OS also.

Compatibility : PHP is compatible with almost all local servers used today like Apache, IIS etc. Embedded: PHP code can be easily embedded within HTML tags and script.


Print “ Hello World “ in PHP
<?php
echo “Hello World”;
?>

Output will be :
Hello World

Or in HTML
<!DOCTYPE html>
<html>
<body>
<?php
echo “Hello World”;
?>
</body>
</html>

Output will be :
Hello World

0 Comments