What is PHP ? Full form of PHP is ‘Hypertext Preprocessor’. PHP is a programming language that allows web developers to create dynamic content that interacts with databases. If you want to build web based software application then you can do that with PHP. So, We will provide you full PHP Introduction here.
History of PHP
The First version of PHP unleashed by Rasmus Lerdorf in 1994 for use in monitoring his online resume and related personal information which was written in C programming language. At that time PHP was called ‘Personal Home Page‘. Later Lerdorf combined PHP with his own Form Interpreter and released the combination publicly as PHP/FI (which is also called PHP 2.0) on June 8, 1995. After that two programmers, Zeev Suraski and Andi Gutmans, rebuilt PHP’s core and released the updated PHP version as PHP/FI 2 in 1997. At that time, The acronym was formally changed to ‘HyperText Preprocessor’.
- PHP is server side scripting language that’s embedded in HTML. PHP is used to create and manage dynamic content, databases, session tracking and we can even build entire e-commerce sites.
- We can integrate PHP with famous databases like MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
- The MySQL server, once started, executes even very complex queries with huge result sets in record-setting time of PHP program.
- PHP supports many major protocols such as POP3, IMAP, and LDAP. PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-tier development a possibility for the first time.
- The syntax of PHP is same like C.
Characteristics of PHP
There are mainly 5 categories in PHP that makes it very easy to use.
Common Uses Of PHP
- PHP performs as system functions. For example, from files on a system, it can create, open, read, write, and close them.
- You add, modify, delete elements within your database through PHP.
- You can restrict users to access some pages of your website using PHP.i.e. gather data from files, save data to a file, through email you can send data, return data to the user.
- Using PHP you can gather data from files, save data to a file, you can send data through email, return data to the user.
- You can encrypt the data using PHP.
- With the help of PHP, You can access cookies variables and set cookies.
‘Hello World’ Program In PHP
As all other languages, We start with ‘Hello World’ program. As Hello World Script in PHP is very easy to write.
Now, We know that PHP is embedded in HTML. So we will put our ‘Hello World’ script of PHP in the HTML tags like given below:
<?php echo "Hello, World!";?>
You can see the result below:
We can write all PHP code between special markup tags given below that can be recognized by PHP parser.
1. <?php Your PHP Code ?>
2. <? Your PHP Code ?>
3. <script language="php"> Your PHP Code </script>
But most common tag is <?php … ?> and we will also use the same tag in all our tutorials.
In the next topic, We will start with PHP Environment Setup on your PC or Laptop and then we will teach you all the topics and concepts of PHP. So, Don’t worry and start learning PHP with us.
If you have any query then feel free to comment down and we will solve your query at it’s best.