Home >Backend Development >PHP Tutorial >Why Developers Love and Hate PHP_PHP Tutorial

Why Developers Love and Hate PHP_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:11:10781browse

Why developers love and hate PHP

The respected server-side scripting language PHP is best known for its use in web development. First released by Rasmus Lerdorf in 1995, it has been influenced by WordPress and Facebook. According to W3Techs, the server-side programming language of 82% of websites is PHP. The language lags slightly behind Java in the ranking of programming language popularity, falling to sixth place in the competitor Tiobe rankings. As a high-performance upgraded version, PHP 7 is expected to be released in 2015.

However, like any language, it has its supporters and detractors. Here's why supporters support PHP and dissenters denounce it.

Good: popular, quick to get started

“PHP is currently the most popular web development language,” said Andi Gutmans, CEO of PHP tool provider Zend Technologies. Josh Lockhart, a developer at New Media Campings and a writer, emphasized PHP's small learning curve, ease of deployment, and rapid development iterations. Lockhart said, "PHP is one of the most accessible web development languages, and it is installed on most servers (including most shared hosts). It is relatively easy to learn because of excellent online documentation and up-to-date online resources."

Good: easy to find a job

"PHP helps you make money and get a job on the server side," Gutmans said. A quick search of the Dice.com technology jobs site last week turned up 3,366 PHP-related jobs. It's tame compared to the 17,418 Java jobs, just behind Perl (4,300) and Python 5,429), but higher than Ruby (2,973) and even Objective-C (985). Lockhart regards PHP as one of the most frequently used languages, although it is somewhat conservative compared with languages ​​​​such as Ruby, Python, Go and Rust.

Okay: continue to develop

The language boasts modern features like closures and namespaces, as well as performance and modern frameworks. As Gutmans points out, "Some people who want to leave don't have the necessary education on what PHP has to offer." Lockhart said developers are realizing that PHP has powerful modern features and a suitable object-oriented programming model. The upcoming version 7 provides huge performance improvements on applications. Lockhart pointed out that Facebook’s enhancements to PHP include the HHVM virtual machine and Hack language Note 2].

Bad: Complaints about design, lack of focus

Blogger Eevee said in his 2012 open letter against the language "PHP: Irregular Bad Design", "In fact, every feature in PHP is more or less irregular." Eevee not only gives bad reviews to the language, but also to the framework and ecosystem. According to the blogger, the language is not predictable and consistent, but full of surprises and inconsistencies. Among critics, PHP has been called opaque, had no default stack trace, suffered from complex, poorly functioning types, and had "no clear design philosophy." Early PHP was inspired by Perl; with 'out' The huge stdlib of parameters comes from C; the object-oriented part imitates C++ and Java design. ”

Lockhart admitted that Eevee’s anti-PHP remarks were “exaggerated.” Despite being a PHP supporter, Lockhart was gracious enough to list the criticism when asked:

  • The language is inconsistent, especially function names and argument order. "This is easily fixed, so it's not a big issue."
  • PHP still has a lot of legacy baggage, like global variables, magic references, etc. "These bad practices are slowly being pruned from the language, but until they disappear, they will encourage ignorant developers to persist in bad practices."
  • PHP is not as focused as other languages, which Lockhart attributes to "committee-driven, long-term piecemealism."

  • Note 1: Zend Technologies is an Internet infrastructure software company. Zend Technologies is best known for its two founders: Andi Gutmans and Zeev Suraski, who, together with other Israeli programmers, developed the PHP language pioneered by Rasmus Lerdorf. http://zh.wikipedia.org/wiki/Zend_Technologies
  • Note 2: Hack, an open source scripting language, runs on the HHVM virtual machine. The main developer is Facebook. Officially released on March 20, 2014. Before launch, Facebook had been using and testing it extensively on its website. http://zh.wikipedia.org/wiki/Hack_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)



www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/931335.htmlTechArticleWhy developers love and hate PHP The venerable server-side scripting language PHP is so popular in web development well-known for its applications. First published by Rasmus Lerdorf in 1995 and inspired by WordPress and Fa...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn