Home Backend Development PHP Tutorial Why is PHP a concentration camp_PHP Tutorial

Why is PHP a concentration camp_PHP Tutorial

Jul 21, 2016 pm 02:51 PM
php was Why article translate

This article is translated from the article Why PHP Was a Ghetto.

One day I was chatting with the boss of a great startup company in DUMBO and talked about why developers in the non-PHP world generally despise PHP and PHP-related communities. He made a point that stuck with me, largely because I had never heard it made like this before.

If you don’t know what complaints most programmers have about PHP, then these complaints would look something like this:

Ugly syntax

Lacks some necessary features that other languages ​​have (before version 5.3, no namespaces, closures)

Inconsistent function naming, usage conventions, and other weird stuff

A mixture of procedural and object-oriented

Basically 80-90% of PHP projects suck like a pile of shit

But the problem with PHP he mentioned is another problem. He doesn't say there's something wrong with the language - he thinks the language is surrounded by a common cultural phenomenon, a cultural tradition usually created by the creators of the language, which now seems to be responsible for some bad programming practices. The method played an encouraging role. That is, it makes PHP code inferior and unmaintainable.

This phenomenon of a language or framework that embodies the founder’s philosophical thoughts and is highly praised by the relevant community does exist. He cited Ruby and its founder Matz as examples. What Matz wanted was a language that was easy to read and write and could improve programmers' work efficiency. Don’t you see how Ruby developers talk about rapid development and the elegance of the language?

Then there is DHH and his Rails framework. And Guido and his Python language. So I was thinking: RasmusWhat about PHP?

Rasmus Lerdorf’s impression is very interesting. He created the original PHP language and has been improving the language. He is worshiped like a god in the PHP community and he enjoys the greatest authority in any aspect of PHP. He was invited to speak at numerous conferences and was hired by a large Internet company (yahoo.com), where he gained everyone's respect - despite the fact that he became the target of most non-PHP programmers. A visual representation of the many problems that despise PHP.

Rasmus advocates avoiding the use of frameworks and treating PHP more as a template language. To him, this approach yields immediate operational efficiency and scalability (the program load is known). For everyone else, this approach resulted in a simmering mess of procedural code and an unmaintainable project. In the approximately 10 years since PHP was born in 1995, all PHP projects have been written according to this guidance.

At the same time, another problem suddenly appeared: before PHP5.0, in the early days of PHP, PHP gained a large number of novice followers. The barrier to entry for this language is surprisingly low. Anyone can download the self-extracting ×AMP Windows program installation package and start using the language within 2 minutes. In addition, there was no real consensus on the MVC pattern in web development methods at that time. So you can imagine what a group of novices can create when they come together with a language that lacks good development practices. An unmaintainable pile of garbage. And the entire environment is like this.

Don't get me wrong - there were still a lot of good PHP developers, even back then. But, like I said, shoddy rookie work is everywhere. When cowboy-style PHP programmers got together to develop programs without guiding principles, the likes of PHPbb, PHPNuke, and many crude .php3 packages emerged. But can you simply blame PHP developers? cannot! Other Web language giants, ASP and Perl, are equally notorious and promote a stew-style development approach.

So this is why PHP gets such a bad rap. It's because of its historical spread. Most PHP developers who had moved to Python, Ruby, and Java did not go back and rethink the language when the MVC concept emerged. In addition, there are some explicit satires like "Ruby boy" Zed Shaw complaining that some programmers' minds are "poisoned by PHP". Comments like this are very popular on RubyInside.

PHP is a concentration camp

But the emergence of frameworks like Zend and CodeIgniter has pushed the language in the right development direction. In fact, it pushed PHP in the opposite direction from what Rasmus wanted to see. Take a look at the Zend and CodeIgniter frameworks, and you will find that they are one of the few programs with well-written documentation and well-written code.

Most developers who learn Ruby also learn Rails and MVC knowledge; PHP has been used for a full 10 years before this. For those who are new to Ruby, it's a shame that Ruby doesn't give them this time to play freely. Rails has ready-made standard guidance, and its entry barrier is relatively high, which usually blocks out some inexperienced developers.

In fact, PHP applications can be written as well as other languages, and they will also have certain advantages in running speed. The rise of the MVC-style development method in the PHP world has only appeared in recent years. We have to admit that we should be grateful to Rails for bringing this change.

So, what does PHP look like today?

Various standards (not unified, but most projects use MVC, few junk procedural programs)

Low entry barrier

Speed ​​and scalability (PHP should be the best among various scripting languages)

Have a good unit testing framework

Have the best documents translated into various languages

In addition, most influential websites on the Internet use PHP as their backend language or tool, such as Facebook, Digg, Wikipedia, WordPress, Drupal, etc. I believe that having an in-depth mastery of PHP will open the door to more unknown areas for a programmer.

If you don’t agree with what’s said above, please leave a comment or email me – I’d like to hear why you don’t think so.

In fact, I am not a PHP fan, I have no feeling for the language. I mostly use PHP because - you guessed it - someone is willing to pay me. So blame it all on this:

If you want to make informed decisions in software design, PHP is your best choice for developing web applications.

By the way, if you are convinced that you want to use PHP to develop your next web application, give CodeIgniter a try. It is a lightweight, plain and super fast PHP framework. I'm a fan of CodeIgniter.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371713.htmlTechArticleThis article is translated from the article Why PHP Was a Ghetto. One day I was chatting with the owner of a great startup in DUMBO and talked about why developers in the non-PHP world generally...
Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Ouyi okx official entrance address Ouyi official link Ouyi okx official entrance address Ouyi official link Mar 21, 2025 pm 06:09 PM

In digital currency transactions, security is crucial. Due to the prevalence of phishing, it is crucial to find Ouyi OKX official entrance address and official links. Incorrect links can lead to account theft, asset loss and identity theft. This article will provide a comprehensive guide to secure access to the Ouyi OKX official platform, helping users identify and avoid phishing websites and protecting the security of digital assets. We will introduce how to confirm the official portal of Ouyi OKX through official websites, official applications, official social media accounts and other trusted channels, and provide important security tips, such as avoiding unknown links, using strong passwords and enabling two-factor verification, to ensure your transactions are safe and reliable.

Ouyi official address Ouyi okx official entrance address Ouyi official address Ouyi okx official entrance address Mar 21, 2025 pm 06:12 PM

With the increasing popularity of digital currency trading, it is crucial to choose a safe and reliable trading platform. As the world's leading digital asset exchange, OKX's security has attracted much attention. However, many phishing websites impersonate OKX official, causing users to face the risks of account security and asset losses. This article will explain in detail how to identify and access the real Ouyi OKX official website and APP entrance to avoid phishing website traps and ensure the security of your digital assets. Through various channels such as official website verification, official app download, official social media channels, and official customer service consultation, you can effectively identify and access the OKX official platform to ensure the security of your transactions. Please be sure to carefully check the domain name, check the HTTPS protocol, and improve network security awareness.

Which is better PHP or Laravel? Which is better PHP or Laravel? Mar 27, 2025 pm 05:31 PM

PHP and Laravel are not directly comparable, because Laravel is a PHP-based framework. 1.PHP is suitable for small projects or rapid prototyping because it is simple and direct. 2. Laravel is suitable for large projects or efficient development because it provides rich functions and tools, but has a steep learning curve and may not be as good as pure PHP.

How to use binance security validator How to use binance security validator Mar 27, 2025 pm 04:48 PM

Want to keep your Binance account safe? This article details how to use Binance security authenticator (such as Google Authenticator), including downloading and installing, enabling settings, backup keys, and daily usage tips to effectively prevent theft of the account.

WordPress site file access is restricted: Why is my .txt file not accessible through domain name? WordPress site file access is restricted: Why is my .txt file not accessible through domain name? Apr 01, 2025 pm 03:00 PM

Wordpress site file access is restricted: troubleshooting the reason why .txt file cannot be accessed recently. Some users encountered a problem when configuring the mini program business domain name: �...

Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Apr 01, 2025 pm 03:06 PM

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

Why do everyone like Binance Why do everyone like Binance Mar 27, 2025 pm 04:36 PM

Want to know why everyone likes to use Binance? This article deeply analyzes Binance's advantages from multiple perspectives such as security, trading products, user experience, transaction fees, and innovation, revealing the reasons for its popularity.

How to set Binance into Chinese Tutorial on setting Binance into Chinese How to set Binance into Chinese Tutorial on setting Binance into Chinese Mar 27, 2025 pm 04:42 PM

Still having a headache about Binance's English interface? don’t worry! This tutorial teaches you step by step how to set the Binance web version and App to Chinese, whether it is Simplified or Traditional, the steps are simple and easy to understand. Say goodbye to the language barrier and enjoy a more convenient and efficient Binance trading experience!

See all articles