PHP stands for Hypertext Preprocessor. Earlier it was known as Personal Home Pages. PHP is a server side scripting language suited for web based technologies and it can be embedded into HTML. PHP runs on server side, so we can say that PHP is a “Server side HTML embedded scripting language”.
There are two types of scripting languages:
1. Client side
2. Server side
Server side scripting languages run on the web server. Server-side scripting is used for database operations and to generate dynamic web pages. The server side scripts are not visible on browsers. No one can see the source code of server script language whereas as you can use, download client side scripts.
PHP is very popular server side scripting language. It is widely used in website development due to its ease of use. The syntax of PHP is very similar to other programming languages. You can use OOPS concept in PHP.
History of PHP:
PHP was invented by Rasmus Lerdorf in 1995. He is known as Father of PHP. He started PHP as a replacement for various Perl scripts. He used PHP to maintain his personal web page. PHP takes most of its syntax from C, Java, and Perl. PHP was written in C programming language.
- First version of PHP was FI (FI stands for Form Interpreter). It was introduced in 1995.
- The second version FI 2 was introduce in 1997.
- Third version was introduced in 1998.
- Fourth version was introduced on 2000.
- PHP 5 was released in July 2004
Some features of PHP 5 are:
1. Improved object-oriented programming:
You can access the following OOPS features in PHP:
- Final methods
- Final classes
- Static methods
- Abstract classes
2. Embedded SQLite:
PHP supports SQLite. SQLite is an embedded database library that implements a large subset of the SQL 92 standard. It is the same as working with MYSQL.
3. Exception handling using a try & catch structure:
PHP 5 supports exception model similar to other programming languages. An exception can be thrown and caught in PHP.
4. Integrated SOAP support:
You can create your own web services in PHP using SOAP (Simple Object Access Protocol). You can create SOAP server as well as SOAP client in PHP.
5. The filter library:
Using filter library (filter_var) you can easily filter data. You don’t need to understand regular expressions.
6. Better XML tools:
7. Iterators (Object Iteration):
It is very easy to iterate objects in PHP such as foreach statement.
PHP 6 has been in development since October of 2006.
What’s new in PHP6?
- Unicode support (It will allow you to use multiple languages within your applications).
- Removal of ereg extension, ‘register_globals’, ‘magic_quotes’ and ‘safe_mode’.
- zend.ze1 compatibility mode to go.
- ‘var’ to alias ‘public’.
- Added 64 bit integers.
- Support for each multi-dim arrays.