Talk about the advantages and disadvantages of php

  • 2020-06-01 08:25:18
  • OfStack

php advantages

Cross-platform, superior performance, don't tell with Linux/Unix Windows combined with 45% being strong of performance, and is combined with a lot of free platform very save money, such as LAMP (Linux/Apache/Mysql/PHP) or FAMP (FreeBSD/Apache/Mysql/PHP), or data application is sufficiently large to consider in PostgreSQL or Oracle, support N kind of database. (N > = 10)

2. Simple grammar, easy to learn if you have to learn C and Perl, and some parts are similar to ASP. There are mature development tools, such as NuPHPed, Zend Studio, etc., and Linux platform can use Eclipse, etc.

3. Current mainstream technologies are all supported, such as WebService, Ajax, XML, etc., which are sufficient for application.

4. There is complete support, such as using ADODB or PEAR::DB for database abstraction layer, Smarty or smart template for template layer, and PDO(PHP Data Object) for database access if PHP 5.1.

5. There are many mature frameworks, such as MVC support framework: phpMVC, ASP.net support event-driven framework: Prado, Ruby On Rails support rapid development framework: Cake, etc., enough to meet your application needs.

6. PHP 5 has a mature object-oriented system, which can adapt to the basic object-oriented requirements. Suitable for large projects.

7. There is a mature community to support the development of PHP.

8. At present, many large applications use PHP, such as taobao, Yahoo, 163, Sina and other large portals. Many choose PHP as their development language, so large portals can use it.

9. There are many open source frameworks or open source systems that can be used. For example, the well-known open source frameworks are Zend Framework, CakePHP, CodeIgniter, symfony and so on. , Phpwind, etc., open source blog WordPress, open source online store systems such as Ecshop, ShopEx, etc., open source SNS systems such as UCHome, ThinkSNS, etc.


disadvantages

1. Multithreading support is not good, most of the time we can only be simple simulation to achieve.

2. The grammar is not strict, for example, variables can be used without definition. In c,java,c++, variables must be defined before they can be used.

3. Perhaps the most painful aspect for experienced PHP programmers is PHP's interpreted operating mechanism. This mechanism enables all relevant resources to be recycled after each PHP page is interpreted and executed. That is, PHP has no way at the language level to have an object reside in memory. In PHP, all variables are page level, and both global variables and static members of the class are cleared after the page is executed. Take JSP as an example. In JSP, Java Bean has four valid values: Page, Application, Session and Request, which correspond to four lifetimes of page, program, session and request. However, in PHP, only Page1 species has a lifetime.


Related articles: