PHP is still what I use for my personal projects. Sublime + SFTP plugin & any shared hosting (all also give at least 1 MySQL). Phpmyadmin I know with my eyes closed but can also default to a static db like SQLite.
It is very fast for me to start, test & itterate.
I've also tried Node but idk sometimes it can hugg memory and even crash, which just never happened with PHP.
It is a little sad but I don't really care anymore because I am not doing client work anymore.
Edit: just to add that I also never really could stand promises in async execution. Such a headache.
Edit 2: also can you believe it that with Node, the script is also the server??? Who in their right mind thought this was a good idea? Like when the script crashed, it crashed the whole app for everyone.
I went from a WP/Laravel dev to .NET Framework and now .NET 5+. For me PHP has always suffered from two primary camps: ancient codebases that people don't dare touch, and poor tooling.
The former came mostly from the PHP camp. The lack of OOP where it was pretty desperately needed was unproductive at best, and at worst yielded a codebase that was so unmaintainable we had to double any time estimates for backend work.
For tooling Laravel, at least the last time I touched it, was pretty good with its scaffolding. Relying on Composer was also very welcome. Using IDEs like PhpStorm was pretty good, but took a lot of configuration.
The one thing that really burned me, however, was the amount of effort it took to get a debugger actually working. I am certain the climate is better now, but at the time almost no emphasis was put on actually using a debugger for development. You could get Xdebug running, but you have to know how to configure your local dev hosting environment properly. If you used a prebuilt package like your WAMPs or XAMPPs or whatever you, you got 90% there, but it's so bloated and didn't reflect your production environments. Vagrant was great... if you spent the time to configure your Vagrantfile with a lot of testing.
These days it takes about 30 minutes to reinstall Windows, install VS, clone my project, hit the run button and I'm off to the races. Is everything frictionless? No, of course not, but I can get to actually building my application without pulling my hair out.
PHP popularity is decreasing because there are better tools for the same niche today. The same happened for Perl in 00s. The same is happening for every web backend language, as JavaScript is becoming ubique due to it being the de facto and only choice for the web frontend.
Maybe PHP can be made better, but it would need some radical changes and then the question is that if it’s worth the effort and maybe to pick up some of the new tools instead.
PHP has already been "rebranded". When people try to dunk on PHP for supposedly being awful, people are quick to point out that that's all from "pre-PHP 5.6" and that "PHP 7/8" are bringing all kinds of excellent features, functionalities, and refinements
The author links to the person thinking that HypeScript is a good name. He says:
"The name HypeScript sounds like a logical name for me, it pays its respect to the name PHP (PHP: Hypertext Preprocessor) as well."
That would be like suggesting that IBM rebrand itself "BizCompany" to pay respect to its own name (?)
Having converted a couple of PHP projects to modern languages and maintained way more than i care to admit:
Its not going anywhere. Or at least in europe its not.
Symfony et al have matured enough so they are usuable for allmost everything web related and if you dont plan to be the next google homepage, it will carry you VERY far.
Is it pretty? No. Is it efficient? No. But you will be able to find 10 coders for the price of 4, that will have your project iterate until you need something bigger and better. If you do not hate your staff, by then they can easily pick up golang and convert into microservices, taking it down piece by piece and making the parts more efficient that need it.
> Without steps like the big improvements in PHP 7 and laravel, PHP could potentially already be irrelevant today.
So what? What's wrong with PHP becoming irrelevant? Surely nobody would complain that ColdFusion is finally irrelevant. People should focus their time and energy on better solutions than PHP or ColdFusion.
I’m a long-time JavaScripter, and after years of working with Java backends and also some time with NodeJS/Express I’ve been working with a PHP backend at my current gig. A few observations:
* PHP documentation sucks. It’s demonstrably incomplete in important cases, and I guess to make up for it they allow anyone with a browser to add comments and examples, many which are distracting and very poor quality. Furthermore, things that start mattering at scale, like memory management, database connection configuration, etc. seem to be solved but completely undocumented.
* As a result the internet is littered with millions of additional “happy path” examples, many of which are outdated as well.
* PHP doesn’t have a big corporate sponsor who is putting serious resources towards improving documentation, tooling and other resources. I would love for Facebook or Etsy or someone who’s gotten a lot of milage out of PHP to take the lead here.
* PHP is European/Israeli led (in the sense that many core devs seem to be there), and a lot of materials don’t seem to cross the pond. (Maybe we Americans put more value in hype and marketing… I don’t know.)
* PHP has warts, which “senior” devs nit-pick mercilessly, yet it really isn’t any worse than JavaScript in that regard. (For some TypeScript-hidden runtime bugs are culturally allowed to be ignored, because TypeScript is cool. JavaScript/Node forces you to use an event loop whether that makes sense or not. Etc.)
* Again, without a large, corporate backer, anyone thinking about “career” worries about getting a job, because there are not large corporate backers. (See how this works?)
The whole situation reminds me of where JavaScript was around 2010: Things have gotten seriously better but the wider-world had not caught on yet. PHP has some very impressive engineering and has proven itself again and again as a solid option, that is, it’s not perfect but it’s good enough.
Where it ends up is hard to say: Maybe it’ll end up like BSD Unix, with ardent fans but not the most popular kid.
Like any programming language, encourage others to produce their own rather then just dumping "Use Symphony" "Use Flask" "Use Angler" "Use React".
This goes for all programming langs, the approach of "I know, lets use xFramework!" is flawed -- you end up with a generic X-lang website which caps your creativity because your locked in to using a framework based upon decisions of the developer. You add your stuff to it, dev updates the framework and you find out your stuff is broken because of some change. Frameworks restrict.
If people started to code their own like back in the day of PHPNuke, PHPCms, e107, PHPBB.. -- these languages wouldn't die. Not to add that the ecosystems of these frameworks are so fragile you end up with a convoluted mess where your stuck with the paradigm of the framework rather than your own design. This adds more further complication where your forced to abandon later on in the game or continue to be sucker punched because you want Z function, which won't be pushed in to the framework. You then create your own Z function but this adds overhead because any future update to the framework has potential of breaking your own function.
I'm an advocate to stop using frameworks. As a black smith does in making a hammer to smeld a tool to create an object. All takes time and effort, skills to develop. But when you do, the satisifaction is so worth it. Creating nothing is something; then from nothing creating something is an amazing feel. The wisdom, knowledge, hackery is far and beyond, you grow as a person. You end making something unique, something that no-one has ever made before. You have your own product.
Using a framework is skipping that step and using what someone else has created rather then your own.
Yes, controversial, you should be reinventing the wheel. Because if your not, your stuck with a pre-defined wheel where you are forced down a path of restrictions. Granted exceptions can be made if it's for corporate bandwagon but where's the individually of coding gone?
Mother Mary came to me speaking words of wisdom, let it be.
PHP has been supposedly dying for 15 years. It's always been super trendy to dunk on it, but in many respects it remains the best tool for specific jobs. And that's what matters. A language's hip factor is not particularly important to me.
Meh, at this point it doesn't matter. There's so much (bad) php code out there that needs to be maintained, any person who learns to write good php has a job for life.
But I've always said that PHP's popularity was due to its availability on free hosting providers. However nowadays, you can get free hosting for a plethora of languages. So more competition, and also there are so many more languages that are competing for the backend nowadays.
New languages are hopefully made taking into account all the lessons learned from previous mistakes older languages made. Old languages can't change too much or they just become hell to upgrade, so they can't compete with the newer ones.
I don't think there's much of a problem with this.
But I will still setup a wordpress if I need a quick site.
I like the php-fpm design of having a persistent server to run code rather than starting a process for every request.
I would like the convenience of replacing one file somewhere and have the file be picked up by the server, similar to PHP.
I would also like to separate release and deploy and do an atomic load of the server.
I think there are Clojure projects to preload the JVM.
The issue I see is twofold.
1) First, understand that one audience matters particularly for programming language popularity, and that is people who are starting their careers. If you learn a language and use it for a few years, it tends to be a language you continue to use throughout your careers.
Here, we have no data. But I can tell you as someone who works with a lot of early stage startups and 20-somethings who are diving headfirst into programming for their startups for the first time, the language of choice is Python, followed by Javascript of some kind.
I have a long history with PHP and dearly love it as a language, but the concern I have is that it's not getting picked up like it was. Still love using it, and boy is Laravel productive for a small team.
That said, this is anecdotal, and I don't have any data here as the programming language surveys are always so broad they don't really have this kind of segmentation to spot early trends. Curious what others are seeing however...
2) Second, as chinabot pointed out, in the short term, AI is likely to supplement the work of programmers, making certain tasks faster and more efficient. However, as AI becomes more sophisticated and capable in the long term, it has the potential to largely replace a lot of programmers. In particular, AI's ability to automate the coding process means that many routine programming jobs may become unnecessary. While this shift may take some time, it's important for those in the programming industry to keep an eye on emerging AI technologies and be prepared for changes to come.
Does that imply that languages that are for working with AI would be the better programming languages to learn? Python, Julia, C++, Java and R are the current core languages in AI land. I don't think it matters in the short term, but the AI shift looks so big it could matter a lot in coming years.
IDK, doesn't look quite as cohesive and convincing as arguments after I wrote them down, but there are some pretty interesting points in here so I'll post it anyways to add to the discussion.
Work on transpilers to whatever is used instead and port existing libraries or support PHP frameworks in other technologies. This is to reuse existing experience and code.
Professionally I work with python and node a lot, but everytime I need a backend for my personal projects PHP is my go to language.
> what to do about it?
Celebrate.
It's because PHP isn't simple anymore. It requires an IDE, it's likely using a framework (at least Laravel seems relatively sanely designed), and everyone wants to make it contain all the features (and most importantly syntaxes) of all their favorite other languages.
If you're using an IDE already pretty much any language could be the same.
I'm not a developer, but my experience with php web apps hasn't been great. They always feel janky and slow, wordpress nextcloud and so on. That's why owncloud created a go version.
I sympathize with people who built a career on PHP, but the time to move on has long since passed. PHP should, in my opinion, go into maintenance mode. It's just too far out of sync with how software development is done these days. I still like using it for personal projects, so selfishly, I hope they don't try to modernize it too much and ruin the simplicity.
Celebrate!
PHP CMSs are not as relevant today, as they were years before. Nowadays you can quickly generate a static website using Hugo or 11ty and host it on Netlify or Cloudflare Pages for free.
Just let it die. I would happily move to different languages
Let it die...
Some folks will never come to it, some folks will stick with it (like me).
Language is language. The value prop for most orgs using tech is the ecosystem. The PHP ecosystem is large, and has a lot of good quality stuff available. Building on laravel or symfony, or using products and services built around those, can be a big advantage over some other tech.
There are always examples and counter-examples, and usually a decision will come down to "you should use what a team is already skilled in". That's the pragmatic answer. You have a team of .net folks... don't jump to express or flask or laravel because of some benchmark or neat article or resume-driven-development. Stay in the .net world, and use what you know. That has to be balanced with "what you know may go away, so be ready to learn new things". Maintaining a balance, both for yourself, as well as the tech in your organizations, is something to regularly be aware of.
I love PHP. I like web stuff overall. Over the last... 30 years of software dev, what I've noticed is that the really useful/good ideas tend to get implemented in various languages if they're useful. The sign of a useful library can often be that there's multiple implementations of it. We saw a productized "web mvc" launch rails, and we then saw a dozen variations in other languages take the essential parts, implement them, and good ideas have flown between various tech camps for years since.
There are counterpoints to that. A colleague is doing some work in SciPy, and there doesn't seem to be an equivalent outside python. In PHP, we have FlySystem, and I've not yet seen an equivalent outside PHP. I've seen some attempts, but they tend to have one or two adapters, and that's it.
Overall, language diffs are often/mostly personal preferences. Your project or business isn't failing because your language of choice can't connect to a database quickly enough, or that you can't write data to filesystem, or whatever. But if you've spent X years with tech Y, you will likely be faster than learning something new (and learning the idiomatic methods of that new tech). Figuring out when to dig deeper, and when to move on... again - no single choice on that.
I may have shared it before, but I saw a company moving new dev away from PHP, and moved to a combination of python and node. "It's so much easier to hire people!" But... they were largely hiring jr and mid level people, and they were doing greenfield redevelopment of some of the PHP stuff. And... they'd attempted a rebuild of the PHP stuff once, but made the same mistake as the first time; primarily one person, working on their own, often offsite, not interacting with other people.
Moving to python/node, they hired more/cheaper people, and the rewriting team required everyone to work together. The languages were pointed to as the reason behind some of the early success, but it was far more the processes around the development that provided the success. With enough people, forced to write cleaner code the whole group can understand, as well as requiring tests and documentation... yes, the outcome is going to be better than requiring one person to build a lot of stuff on their own, without providing adequate time for testing, documentation, or collaboration with others.
Likely most of us have come across enough bad JS/Python/Perl/PHP/Java/C#/etc to understand the quality of the code is only tangentially related to the language, and far more about the processes and expectations set around the development.
Its appeal is becoming more selective.
Personally, I'm not bothering to learn any new languages, stacks or APIs and will stick with what I know. AI will eventually (2-10 years) end up completely re-writing your whole program stack in machine code in whatever ISA without any bugs. The future of programming is a prompt engineer, write it in psudo code and english and output fully tested machine code.
Please do nothing. Just let it die as it should have had already.
Accelerate it any way imaginable.
I understand php is gong through some transformations right now, if it were up to me I would rename php to "Elephant" with file extension of E
The world that PHP grew up in has changed. The language and community have matured, and in the process PHP has lost most of its competitive advantage: low barrier to entry.
It used to be:
Projects that started from HTML + PHP tags grew and became unmaintainable messes. The PHP community learned from this and evolved in a different direction. You can still _write_ PHP code in the old way, but it's strongly discouraged and (rightfully) seen as a bad practice. You don't even use PHP as a templating language anymore. Symfony and Laravel have their own templating languages that dynamically compile to PHP.Modern PHP code looks very much like Java or C# -- classes, OO design patterns, and so on. Except in most ways, it's worse than Java or C#. Why would anyone start a new project in PHP?
Deploy models have also changed. You're usually not copying files to servers, but deploying Docker images or other formats. PHP has no particular advantage in this new world.
If PHP wants to turn things around, it needs to figure out what makes it unique or better than other languages. Right now, there's really nothing.