Whole document tree
    

Whole document tree

PHP HOW-TO: Introduction Next Previous Contents

1. Introduction

(The latest version of this document is at http://www.milkywaygalaxy.freeservers.com. You may want to check there for changes).

Definition: PHP is a simple, object-oriented, interpreted, robust, secure, very high-performance, architecture neutral, portable, dynamic scripting language. PHP has "class" keyword similar to Java's "class" keyword. And PHP is designed such that it is 5 times faster than Java, since there is no virtual machine. PHP is very fast becoming a standard, general purpose, object oriented scripting language. PHP is not only meant for web applications but also can be used for developing general applications.

PHP is a very powerful scripting language. PHP stands for 'Hypertext Pre-Processor' and is a server side HTML scripting/programming language. PHP is C-like Web scripting language runs on Apache, Netscape/iPlanet, and Microsoft IIS Web servers. PHP is a tool that lets you create dynamic web pages. PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages. PHP lets you write simple scripts right in your HTML files much like JavaScript does, except, unlike JavaScript PHP is not browser-dependant. JavaScript is a client-side html-embedded language while PHP is a server-side language. PHP is similar in concept to Netscape's LiveWire Pro product and Microsoft's ASP and Sun Microsystem's JSP.

PHP is not only used for creating web applications, but also for creating general standalone applications.

PHP's strength are :

  • Open source
  • Easily learned syntax
  • Broad database connectivity
  • Massive library of contributed extensions
  • General purpose scripting language much superior to PERL, VB script, ASP, JSP.

Why PHP ? PHP is the best because of the following reasons:

  • PERL is "YUCKY" (distasteful) because it is hard to read and maintain the programs. Not object oriented.
  • Java is object-oriented but is very SLOW. Java programs run very slow. The only complaint against Java is "Java is God-damn-slow". Also Java is immensely complex and sophosticated technology (has many layers like JVM, JIT and others). And complexity and sophostication leads to problems. If Linux is there why do you need Java in servers ?
  • Python is "good" but there are no C like brackets/braces which are useful for code navigation in vi editor. It is like your hand is broken if you cannot navigate rapidly the source code using vi editor's seek braces/brackets commands.
  • PHP is the best because it is object oriented and has the best features of C/C++/Java/PERL. It can replace PERL, Python, Java, C, C++, awk, Unix shell scripting, MS Visual Basic and others!! PHP runs direct and PHP is written in C.
  • Each and every computer programmer knows why PHP is the best. Ask your nearby computer programmer.
  • Only PHP will prevail in the 21st and 22nd century!

PHP was kept the "top secret and strictly confidential" computer language by many companies in the world, but now had become the most well-known and most widely used object oriented scripting language for web, internet, e-commerce, general purpose and business-to-business projects. Even today many competing companies keep PHP language as a highly confidential matter not disclosing to outsiders (competitors).

PHP will storm the entire world and will take the IT industry by surprise!! The power of PHP is that it is cross-platform and runs everywhere!! It runs on Linux, Windows 95/98/NT, Windows 2000, Solaris, HPUX and all flavors of UNIX. PHP is write once and deploy anywhere and everywhere. It runs on many web-servers like Apache, Microsoft IIS, etc..

PHP runs 5 to 20 times faster than Java!! In actual benchmarks, PHP was about 3.7 times faster than JSP (see benchmarks ). PHP is extremely easy to use and you can develop very complex web/e-commerce/general-standalone applications very rapidly in a very short period of time. (In future PHP language will imitate most features of Java language and Java programmers will love PHP. And PHP will have java keywords like class, extends, interface, implements, public, protected, private etc..).

It has object oriented features and takes the best features from Java, C++, PERL and "C" languages. PHP language is a marriage of best features from Java, C++, PERL and C.

PHP is the real gem of all the scripting/programming languges and will soon become the "MECCA" for programmers world-wide!! PHP has a huge user base and a large developer base as it runs on both Window95/NT/2000/XP and all flavors of UNIX'es.

A big surprise is waiting for us - Most probably PHP will be the computer language/scripting language of the 21st century!!

PHP can be compiled and optimized to make it run even faster by using the Zend Optimizer. Zend optimizer is integrated with PHP in PHP version 4.0. First, you will write your application in PHP scripting language during development, testing and debugging. Once the project is ready for deployment you will use the Zend compiler to compile the PHP to create executable which will run very fast.

You would normally use a combination of PHP (70% code) + HTML/DHTML/XML (25% code) + Javascript (5% code client side validations) for your e-commerce projects.


Next Previous Contents