PHP Introduction

PHP is a server-side, open source scripting language that help you to create dynamic and interactive webpages.

PHP is a general-purpose scripting language that was originally conceived by Rasmus Lerdorf in 1995. Lerdorf
created PHP to satisfy the need for an easy way to process data when creating pages for the World Wide Web.


What is PHP?

PHP stands for PHP: Hypertext Preprocessor
PHP is a server-side scripting language, like ASP
PHP scripts are executed on the server
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL,
Generic ODBC, etc.)
PHP is an open source software (OSS)
PHP is free to download and use


Why PHP?

PHP runs on different platforms (Windows, Linux, Unix, etc.)
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP is FREE to download from the official PHP resource: http://www.php.net
PHP is easy to learn and runs efficiently on the server side


Advantages of PHP

  • Open source: It is developed and maintained by a large group of PHP developers, this will helps in creating a support community, abundant extension library.
  • Speed: It is relative fast since it uses much system resource.
  • Easy to use: It uses C like syntax, so for those who are familiar with C, it’s very easy for them to pick up and it is very easy to create website scripts.
  • Stable: Since it is maintained by many developers, so when bugs are found, it can be quickly fixed.
  • Powerful library support: You can easily find functional modules you need such as PDF, Graph etc.
  • Built-in database connection modules: You can connect to database easily using PHP, since many websites are data/content driven, so we will use database frequently, this will largely reduce the development time of web apps.
  • Can be run on many platforms, including Windows, Linux and Mac, it’s easy for users to find hosting service providers.

Disadvantages of PHP

  • Security : Since it is open sourced, so all people can see the source code, if there are bugs in the source code, it can be used by people to explore the weakness of PHP
  • Not suitable for large applications: Hard to maintain since it is not very modular.
  • Weak type:  Implicit conversion may surprise unwary programmers and lead to unexpected bugs. For example, the strings “1000” and “1e3” compare equal because they are implicitly cast to floating point numbers.