PHP - Introduction


PHP is a popular general-purpose scripting language that is especially suited to web development.
PHP (recursive acronym for PHP: Hypertext Preprocessor ) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
The PHP code is enclosed in special start and end processing instructions denoted by <?PHP  and  ?> that allow you to jump into and out of "PHP mode."
What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.
There are three main areas where PHP scripts are used.
  • Server-side scripting. This is the most traditional and main target field for PHP.
  • Command line scripting. You can make a PHP script to run it without any server or browser. You only need the PHP parser to use it this way.
  • Writing desktop applications. PHP is probably not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client-side applications you can also use PHP-GTK to write such programs
As has been the customary since ages, we start learning every new programming language with classic "Hello World" example, so here comes the same in PHP:
  • <?PHP
          echo 'Hello world' . nl2br(PHP_EOL); // prints 'Hello World' on stdout or web page - and cursor moves to next line
          echo 'Greetings from PHP!' . '<BR>';
    ?>


Some salient features....
The PHP's salient features are listed below:
  1. Beautiful is better than ugly.

References


No external reference for Introduction chapter
Sole ownership of this portal development, its contents are with Jagmah Software System
This portal's design, development, maintenace as well as all its contents are owned by Satya Prakash Nigam