What is PHP?
PHP is a server-side scripting language. that is used to develop Static websites, Dynamic websites, or Web applications. PHP stands for Hypertext Pre-processor, which earlier stood for Personal Home Pages.
PHP scripts can only be interpreted on a server that has PHP installed.
The client computers accessing the PHP scripts require a web browser only.
A PHP file contains PHP tags and ends with the extension “.php”.
In this tutorial, you will learn-
Example #1 An introductory example
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <?php echo "Hi, I'm a PHP script!"; ?> </body> </html>
Instead of lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does “something” (in this case, output “Hi, I’m a PHP script!”). The PHP code is enclosed in special start and end processing instructions
?> that allow you to jump into and out of “PHP mode.”
The best part about using PHP is that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don’t be afraid to read the long list of PHP’s features. You can jump in, in a short time, and start writing simple scripts in a few hours.
Although PHP’s development is focused on server-side scripting, you can do much more with it. Read on, and see more in the What can PHP do? section, or go right to the introductory tutorial if you are only interested in web programming.