What is it?

PHP is a widely-used general-purpose scripting language that can be embedded into HTML. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. PHP stands for PHP: Hypertext Preprocessor.

Who is it for?

PHP is especially suited for Web development. It allows Web developers to write dynamically generated pages quickly. It can be used for Web sites and Web applications including server-side scripting, command line scripting, and in Desktop GUI applications.

Features

PHP can do almost anything. It is mainly focused on server-side scripting, so it can do anything any other CGI program can do, such as collect form data, generate dynamic page content, or send and receive cookies. The three main areas where PHP scripts are used include server-side scripting, command line scripting, and writing desktop applications. Server-side scripting is the most traditional and main target field for PHP. The user needs to run the Web server with a connected PHP installation. The PHP program output can be accessed with a Web browser, viewing the PHP page through the server. For command line scripting, a PHP script can be made to run without any server or browser. Users only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron on Linux or Task Scheduler on Windows. These scripts can also be used for simple text processing tasks.

As for writing desktop applications, PHP is probably not the very best language to do so with a graphical user interface. However, a user that knows PHP very well and wants to use some advanced PHP features in client-side applications can also use PHP-GTK to write such programs. It also offers the ability to write cross-platform applications this way. It should be noted, however, that PHP-GTK is an extension to PHP, not available in the main distribution.

One of the strongest and most significant features in PHP is its support for a wide range of databases. It makes writing a database-enabled Web page incredibly simple. There is also a database abstraction extension that allows the transparent use of any database supported by that extension. PHP also has support for talking to other services using protocols such as LDAP, IMAP, SNMP, NNTP, POP3, and HTTP. Users can also open raw network sockets and interact using any other protocol. PHP has support for the WDDX complex data exchange between virtually all Web programming languages. PHP also has support for instantiation of Java objects and using them transparently as PHP objects, and the CORBA extension allows access to remote objects. In addition, PHP has extremely useful test processing features, extensions, search engine functions, conversion utilities, and much more.

Compatibility

PHP can be used on all major operating systems, including Linux, many Unix variants, Microsoft Windows, Mac OS X, and RISC OS. PHP has also support for most Web servers, including Apache, Microsoft Internet Information Server, Personal Web Server, and Netscape and iPlanet servers. For the majority of the servers PHP has a module, for the others supporting the CGI standard, PHP can work as a CGI processor. PHP can generate HTML, and HTML can pass information to PHP. When using PHP for command line scripting, the command line executable is required. In this case, no server or browser is needed.

Featured Web Hosts that Offer PHP

All Web Hosts that Offer PHP