PHP – Introduction,PHP started out as a small open supply mission that evolved as increasingly people determined out how useful it changed into. Rasmus Lerdorf unleashed the primary model of PHP manner returned in 1994.
- PHP is a recursive acronym for “PHP: php”.
- PHP is a server facet scripting language that is embedded in HTML. It is used to manage dynamic content, databases, consultation tracking, even construct entire e-trade websites.
- It is integrated with a number of popular databases, such as MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
- PHP is pleasingly zippy in its execution, specifically while compiled as an Apache module on the Unix facet. The MySQL server, as soon as started out, executes even very complicated queries with huge result units in report-putting time.
- PHP helps a huge quantity of major protocols along with POP3, IMAP, and LDAP. PHP4 delivered assist for Java and distributed item architectures (COM and CORBA), making n-tier improvement a opportunity for the first time.
- PHP is forgiving: PHP language tries to be as forgiving as possible.
- Syntax is C-Like.
PHP – Introduction Common uses of PHP
It performs gadget capabilities, i.E. From documents on a machine it is able to create, open, study, write, and near them.
PHP can handle paperwork, i.E. Acquire facts from documents, store data to a document, through e-mail you may ship facts, go back records to the person.
You add, delete, modify factors inside your database thru PHP.
Access cookies variables and set cookies.
Using PHP, you can restrict customers to access some pages of your internet site.
It can encrypt facts.
Characteristics of PHP
Five essential traits make PHP’s sensible nature possible −
“Hello World” Script in PHP
To get a experience for PHP, first begin with easy PHP scripts. Since “Hello, World!” is an crucial instance, first we are able to create a pleasant little “Hello, World!” script.
As cited in advance, PHP is embedded in HTML. That way that during amongst your regular HTML (or XHTML if you’re contemporary) you’ll have PHP statements like this −
<html> <head> <title>Hello World</title> </head> <body> <?php echo "Hello, World!";?> </body> </html>
It will produce following result −
If you have a look at the HTML output of the above example, you’ll be aware that the PHP code isn’t always gift within the file sent from the server on your Web browser. All of the PHP present within the Web page is processed and stripped from the page; the handiest factor lower back to the customer from the Web server is natural HTML output.
All PHP code need to be included interior one of the three special markup tags ATE are recognised via the PHP Parser.
<?php PHP code goes here ?> <? PHP code goes here ?> <script language = "php"> PHP code goes here </script>
A most common tag is the and we are able to also use the same tag in our tutorial.
From the following chapter we will begin with PHP Environment Setup for your system and then we will dig out nearly all standards related to PHP to make you cozy with the PHP language.