How To >> Browse Articles >> Web Applications

Rate

What is PHP?

Notepage

PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.

Ever wondered how popular PHP is? see the Netcraft Survey.

What is PHP?

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.

Simple answer, but what does that mean? An example:

Example 1.1. An introductory example:

<html>

<head>

<title>Example</title>

</head>

<body>

<?php echo “Hi, I’m a PHP script!”; ?>

</body>

</html>

Notice how this is different from a script written in other languages like Perl or C — instead of writing a program with lots of commands to output HTML, you write an HTML script with some embedded code to do something (in this case, output some text). The PHP code is enclosed in special start and end tags 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. If you were to have a script similar to the above on your server, the client would receive the results of running that script, with no way of determining what the underlying code may be. 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.

The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don’t be afraid reading 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.


Rate
  • Dsc04268_max50

    Alba

    8 months ago

    2394 comments

    Thanks for sharing this info...

What's the Scoop?

Post a link to something interesting from another site, or submit your own original writing for the ArtBistro community to read.

Report News Here

Video of the Day

Chocolate Rabbit Meltdown
A chocolate rabbit is shown melting three times. While humorous, the controlled color palette and slow minor tones of the background make for an almost soothing display of slow destruction.