Hello there, just couple of words about PHP. I've been develop on PHP more than 10 years, I've seen it all 3,4,5,{6},7. Yes PHP was not good in terms of engineering and patterns, but it was simple, it was the most simple language for web to start those days. It was simple as you put code into file, upload it via FTP and it works. No java servlets, no unix consoles, no nothing, just shared hosting account was enough to host site, or even application with database. As database everybody used to have mysql, again because its simple to start and easy to maintain. So PHP+MySQL became industry standard on Web during 00-2012, and continues in some way.
You can write HTML and logic inside single file, within php code, even more single file may content few pages, or even kind of framework. That simplicity and agility sticks everybody who wants to develop sites with PHP.
This is pretty much about why it is so popular.

Each good or wannabe PHP developer in an early days write its own framework or library (like in javascript this days because of nodejs)

Imagine that PHP has hadn't have package manager, developers used to have host packages on their own sites, then various packages catalog sites created, and then finally composer. A gazillions of php code had spread over internet, without any kind of dependency control. To include libraries to your projects you have to just write include, or require. Some developers do it better than others.

So what we have ? A lots of code, no repositories, zip archives with libraries, no dependency control.
Project that uses that kind of code are still alive even today, they are solid hose of cards, and unmaintainable of course.

And main question that I'm trying to answer is Why PHP is not good ?
- First is amount of legacy code which people copy and pasted into their project, spread it even more like a virus.
- Lack of industry standards at the beginning lead to a lots of bad practices among developers. PHP code usually smells.
open source php projects in early days was developed in same conditions so even in phpbb, phpnuke, wordpress, drupal used to have a lot of bad practices in their codebase. So php developers usually not study by another library, instead they write their own frameworks/libraries.
- "It works", - there are no strong business demands, on web development, again because lack of standards, and concerns.
This three things are basically same, they linked to each other and summarize of answer of why PHP have strong smells and everybody yelling against it.

Whats is with PHP nowadays ? Of course PHP today is more influenced by good practice of webdev. Composer, Zend, Laravel, Yii, Symphony and language it self became more adult so to say, but developers...

People who never tried anything except PHP are usually weaker in programming and ecosystem knowledge than people who tried something else, python, perl, ruby, c for instance.


PHP as any other programming language is a tool. Each tool has its own task. Consider this and your task requirements and PHP can be just good enough solution.
"PHP is shit" - usually you heard that from people who never write strong applications on PHP and haven't used any good tools like Symphony or Laravel.
Cheap developers, - the bigger community, the more chance to hire cheap developers, and more chance to get bad code. That can be applied on any other language.
PHP has professionals developers, usually they have not only php on scope.

That's all folks, this is very brief, I am not covering php usage early days in details, but this is good enough to understand the point.


  • 2
    Welcome to devRant :)

    I was part of that scene in the early days and I'm SO glad webdevelopment matured since then!
  • 0
    @ananaszjoe Thx. About webdev grew up, but I feel same pattern still remain, especially in javascript community by mostly same reasons, everybody wants to write own framework, own library ... ;-)
  • 0
    @noroot I think a lot of developers are aware of this problem.

    I for one avoid creating new libraries or frameworks and aim to find one that does the job already, or I can contribute to open source projects.

    Mind you, I'm not saying that there's not too much frameworks already 😉
  • 3
    I used PHP in 2 proyects, not big but in that moment were complex to me. I took courses, read A LOT and today if I need to do a backend I will use PHP without doubt. Why? Because as you said, it's simple and that mean short developing time for a simple task. I learned JS (and used NodeJS in a few proyects) but I still prefer PHP for web backend.
  • 3
    PHP 7 is still the third fastest programming language, with the Node.js runtime environment being the second, and Go being the first.

    However, PHP is way better in terms of documentation and community support - not being splintered into 1000 pieces like NPM is, and with many more senior developers backing it than Go (which is still "young and inexperienced.")

    I don't use it often these days. But feel, with all its problems - past and present - it's a great way for new developers to wet their chops, and very well supported as an industry standard that will live on over the next decade... something we can't necessarily say about some JS frameworks.
  • 3
    Amen! I don't like to "discuss" which language is better. Because it's like comparing apples with pears :p.

    PHP is indeed simple to learn and that's why it's here to stay :) PHP 7.x was I think one of the most upgrades it ever got!
  • 0
    I've a great interest in learning about programming. How could I start for it? Can you please help me here?
  • 0
    Yeah, great additions, it is a tool, but i still hate it with all my guts.

    Very bad tooling (xdebug sometimes simply doesn't want to work), php.ini, inconsistent test suites that sometimes even fight with well estabilished frameworks (ex: symfony + psalm), very bad dev experience and poor ide support if you're not using PHPStorm.
Add Comment