| |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.
PHP stands for PHP: Hypertext Preprocessor.
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.
What are the differences between PHP 3 and PHP 4?
Here's a list of some of the more important new features:
- Extended API module
- Generalized build process under Unix
- Generic web server interface that also supports multi-threaded web servers
- Improved syntax highlighter
- Native HTTP session support
- Output buffering support
- More powerful configuration system
- Reference counting
PHP is a reflective programming language originally designed for producing dynamic web pages. PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
The main implementation is produced by The PHP Group and released under the PHP License. It is considered to be free software by the Free Software Foundation. This implementation serves to define a de facto standard for PHP, as there is no formal specification.
Currently, two major versions of PHP are being actively developed: 5.x and 4.4.x; on July 13, 2007, the PHP group announced that active development on PHP4 will cease by December 31, 2007, however, critical security updates will be provided until August 8, 2008.
Usage
PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output, however it can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
Server-side scripting
Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting. While running the PHP parser with a web server and web browser, the PHP model can be compared to other server-side scripting languages such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages, mod_perl and the Ruby on Rails framework, as they all provide dynamic content to the client from a web server. To more directly compete with the "framework" approach taken by these systems, Zend is working on the Zend Framework - an emerging (as of June 2006) set of PHP building blocks and best practices; other PHP frameworks along the same lines include CakePHP, PRADO and Symfony.
The LAMP architecture has become popular in the Web industry as a way of deploying inexpensive, reliable, scalable, secure web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P can also refer to Python or Perl. PHP can be used with a large number of relational database management systems, runs on all of the most popular web servers and is available for many different operating systems. This flexibility means that PHP has a wide installation base across the Internet; over 19 million Internet domains are currently hosted on servers with PHP installed.
Examples of popular server-side PHP applications include phpBB, WordPress, and MediaWiki.
Command-line scripting
PHP also provides a command line interface SAPI for developing shell and desktop applications, daemons, log parsing, or other system administration tasks. PHP is increasingly used on the command line for tasks that have traditionally been the domain of Perl, Python, awk, or shell scripting.
Client-side GUI applications
PHP provides bindings to GUI libraries such as GTK+ (with PHP-GTK), Qt (with PHP-Qt) and text mode libraries like ncurses in order to facilitate development of a broader range of cross-platform GUI applications.
What is PHP-GTK?
PHP-GTK is an extension for the PHP programming language that implements language bindings for GTK+. It provides an object-oriented interface to GTK+ classes and functions and greatly simplifies writing client-side cross-platform GUI applications.
There are 2 major version of PHP GTK available:
PHP GTK1 - runs using PHP4
PHP GTK2 - runs unsing PHP5
PHP-GTK 2 Beta!
[17-June-2007] The PHP-GTK team is proud to announce the release of a beta version of PHP-GTK 2. This release, aptly named extension extravaganza, brings with it tons of new features that you can look forward to.
PHP GTK2 is only a beta version. We would recommend to start new project using PHP GTK2. If existing project is written using PHP GTK1 we would not recommend to upgrade yet.
Some other online resources:
www.help-php.com
www.thePHPforum.info
www.helpPHP.info
|
|
|