What are the Horrors of PHP?
- Sujal T Wscube
- Aug 17, 2022
- 2 min read

First of all, many of the drawbacks mentioned in the earlier responses are no longer relevant.
For web development, I've experimented with several different programming languages. PHP now satisfies the bulk of my requirements for backend development, while there are no guarantees that this will be the case in the future. Every now and again, I draw analogies to other languages I've encountered.
Liberation and disarray
You may write your PHP application as you like. Your code can be completely or only partially clean. You can still use the app if you take a different path. Contrary to Java, where programmers encounter the reverse problem, limitations and excessive class use can result in "headache" of unnecessarily many files and complicated architectural designs, even for deceptively simple operations.
incentives to write poor code
With PHP, you can truly do a lot of things. Even though OOP and the SOLID approach are now commonly advised, you could still come across software or libraries that don't follow these standards.
Legacy
Software that was created years ago but is still in use today, such as the most popular CMS or educational software, is impacted by the legacy code, which is typically written in a non-OOP manner (WordPress and Moodle, respectively).
Richness without bias can occasionally be a disadvantage.
There are just too many options, starting even before the language itself with the server, especially for a beginner. For the similarly aged language Java EE, the problem is the same.
new programming features are deployed gradually
Depending on your viewpoint, this may be a benefit or a disadvantage. Functional approach, reactive programming, and other ideas are not, however, being quickly incorporated into the language itself. This problem exists in Java as well, but PHP goes one step farther. The fact that PHP is well-known and dependable is one advantage. It is not JavaScript or Node.
C-language expertise
My least favorite languages are C and C++. They lack quality and are useless. The C++/C style is likewise not my style. Prior to switching to PHP, I typically developed in Java, and I found this modern approach to be lot more practical and beneficial. Fortunately, this is gradually resembling languages like C#, Java, or Python due to the extensive adoption of the Symfony framework.
odd customs
similar to namespaces: Or the obsolete functions, whose names commonly start with "."
But overall, I'm happy with PHP. Any language offers advantages over others, notwithstanding its flaws. PHP is a powerful and straightforward tool in the hands of a very talented programmer that allows for a wide range of results and boosts overall efficacy to levels that, when writing in Java, for example, you would only dream of.
You may check out the online PHP quiz to see how much you know.
Comments