1.1. Advantages and disadvantages

At the heart of the popularity of PHP are the following advantages:

  • Web Development Orientation – PHP was created, developed and maintained as a language for creating Web sites. Many designs and solutions in it are created for the convenience of working in a Web environment.
  • Cross-platform – PHP is transferred to all major operating systems: you can develop a website in Windows, Mac OS X, and operate on a Linux-server. The complexity of the transfer will be minimal and leveled language.
  • Free of charge – PHP is a development from the world of free software, you don’t need to pay either for the language itself or for the majority of related programs (editors, Web servers, databases). In addition, most software products with which you have to deal will have source code available for review and modification. Money may be required when renting a domain name and server for publishing a site on the Internet. However, it is possible to study PHP without investing a penny.
  • Low entry threshold – explore PHP and start building ready-made applications on it a lot easier than using competing technologies (.NET, Python, Ruby, Go). Studying PHP does not close other technologies for the developer; on the Web, the language itself is a significant, but smaller part of the technologies used. Knowledge, techniques, related technologies (Web-servers, databases, libraries, auxiliary languages) will be useful in any other ecosystem other than PHP. When creating your own business, it is often easier and cheaper to assemble a team of PHP developers.

According to the law of conservation, any thing that has at least some dignity, has flaws. PHP also has them.

  • Lack of a leader – many technologies and languages have a leader, an architect who determines the appearance of technology, sets the development vector, decides what should be and what will never be (Linux, Python, Ruby, etc.). There is no leader in PHP, many solutions and constructions are a compromise of interest groups and historical realities.
  • Inconsistent syntax – when learning the PHP language, especially the old part, based on functions, you may notice that some of the functions have the prefixes array_, str_, some have not. The parameters of the functions may be located not entirely logical and not the same as in another function of the same group.
  • PHP is already a long-living language. When a language first appears, it is rather elegant and internally consistent. As the life cycle progresses, the language acquires with additional keywords, artifacts, outdated constructions that seem to be working, but which are not recommended to use. PHP had a rather stormy youth, in the course of which a mass of directives and techniques were abolished, which at first glance should have facilitated the development, and in practice turned into serious security problems. PHP itself, launched as a non-object-oriented language, has now become a full-fledged object-oriented language. However, it is full of old procedural artifacts that will have to use.
  • The PHP developer community is large and disconnected because PHP is one of the first technologies for developing Web-projects, half of the Internet was created with its participation. At the same time, a huge number of programmers worldwide were involved in PHP development. All this has generated a large number of very different approaches, frameworks and ecosystems incompatible with each other. Moreover, thanks to the efforts of powerful and influential social networks (primarily Facebook, VK.com) alternative implementations of PHP have appeared. This is bad, because many ecosystems within PHP are not compatible, and the community is fragmented and spends effort on creating the same libraries within different groups. The situation is corrected with the help of PSR standards. Developers agree on common rules and interfaces for framework compatibility, but this process is still at the beginning, while competing technologies (.NET, Ruby) already have a single platform for all frameworks.