Today's Question:  What weekend projects have you created?        GIVE A SHOUT

What are advantages and disadvantages of PHP?

PHP is a very popular programming language used to design website. There are more than 20 million websites designed using PHP. It must have its advantages. Also PHP is not perfect, it has its limitations. Why is PHP so popular? What are the advantages of PHP? What are limitations of PHP?



One advantage I can think of is that PHP has both procedure programming language and OOP language features. This mainly attributes to its evolution along the way. This means that programmers from different programming language background can pick up this language within short period of time.

Its disadvantage also comes from its ample language features. Some libraries written by a programmer from a procedure programming langauge may be difficult for programmers with an OOP background to maintain.

  REPLY  Posted by at 2014-08-29 08:53:40


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.
  REPLY  Posted by Anonymous at 2012-06-18 11:18:53

Reply to :

For a start, your grammar is horrible.


Correction: PHP is executed before reaching its target client, therefore you cannot see PHP code inside the web page source code, only the output of the executed HTML. 



Yes PHP is opensource as Java, but how people can see php code? if open source means can we see it? then what about Java?

  REPLY  Posted by at 2016-08-25 07:32:30

Reply to nagaraj :

Ha.. Ha.. Correction. PHP is not a compiled code like Java. Thats why performance and security wise having some problems. 



PHP is a fast, simple, open source, yet popular language preferrably for web development. It couples best with MySQL DB in the backend. For more info on benefits of php you can visit Advantages and Benefits of PHP

  REPLY  Posted by at 2014-05-30 22:49:04

Reply to romilgoel :

What are the disadvantages?



For advantages, you can get some clues from this article. PHP is much better than you think

  REPLY  Posted by Anonymous at 2012-09-19 11:46:03



- easy to set up under Apache
- own easy-to-start server for testing
- simple syntax
- many frameworks available


- slow, could be faster
- confusion between arrays and hash tables
- database access should be in the language just like dbase4

  REPLY  Posted by Anonymous at 2012-06-18 19:17:20


"Hard to maintain since it is not very modular."

Sorry, this is not true.  You can make it as modular as you want.  It has full OOP capabilities and you can divide your project into multiple files and directories.

You can make a hard-to-maintain app in any language.

  REPLY  Posted by Anonymous at 2012-06-18 14:56:08

Reply to :

Agree with you about the last part.

Regrading hard to maintain, the OOP support was not there when it was first released. It was added since PHP 5



Sorry! You need to login first to post answer.


Login with Facebook Login with Twitter

Back to top