About PHP ?

PHP is a server-side scripting language designed primarily for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Development Team. PHP originally stood for Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.
PHP files have extension ".php"
PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP supports a wide range of databases.
PHP is free. Download it from the official PHP resource: www.php.net

PHP is an amazing and popular language!
It is powerful enough to be at the core of the biggest blogging system on the web (WordPress)!
It is deep enough to run the largest social network (Facebook)!

Syntax

A PHP script starts with 
<?php 
   //and ends with 
  // PHP code goes here
?>
A PHP script can be placed anywhere in the document.


Example

<!DOCTYPE html>
<html>
<body>

<?php
// This is a single-line comment
# This is also a single-line comment
/*
This is a multiple-lines comment block
that spans over multiple
lines
*/


$x = 5 + 5;


//  a variable starts with the $ sign.

echo $x;
?>


// Note: PHP statements end with a semicolon (;).

</body>
</html>

Comments

Popular posts from this blog

Bootstrap Breakpoints