> For a "dead" language, PHP sure seems to have a lot of life left in it!
I honestly have not met, in real life, anyone that has thought PHP is dead. People that hated PHP? Oh yeah, I've met plenty of such people, often from using it in anger in pre-7+ days. And, (to be fair) for a language nerd, even new PHP is not exactly an exciting language. It's productive, but so very far from glamorous.
But dead? How can it be? Wordpress is an absolute behemoth. Laravel is large. Symphony finds plenty of use in the biggishOrg space. Even Drupal is not dead. Who in their right mind could think it's dead?
*Some people. I despised older versions from my time dealing with it (during the upgrade from PHP2 to 3), and I never wrote non-trivial amounts of JS until the last year or so. PHP has a broad base of anti-support.
BTW, my loathing of earlier versions don't carry through to now. I haven't had to look at it in a couple decades and maybe it's better now. I was strongly in the hater camp, based on my own personal experiences with it, around the time JS was starting to become a thing.
It's also true that this forum and the startup ecosystem in general doesn't represent the reality of global software development. Saying "PHP is dead" is accurate if your entire world is silicon valley.
"PHP is dead" in the sense that your startup is likely dead if you tell potential investors that you use PHP. Outside the startup world incentives are a bit different
Also, containers build on other containers. E.g. the highly popular phpmyadmin or nextcloud images build on top of php. So each "nextcloud" pull, will result in a pull for php too. Are those developers? Does that mean hundreds of millions less pulls?
Let me share this—I've worked in a large recruitment company where we were hiring developers from all around the world, and our business model was pretty much the same as Crossover's.
PHP was always the most in-demand tech for backend development, and of course, this includes frameworks like Laravel and Symfony.
So yes, PHP is thriving.
It doesn’t mean that other languages are bad or something that’s ridiculous.
this is just to answer the "PHP is dead" folks
Every language has its place, and they all have their strengths in different contexts.
Honest question, have there been startups which chose PHP recently?
To be even more honest, I never thought that PHP was dying, but I often thought it should not be used for new projects.
Previous job was in a very PHP-oriented company and it was just a Java alternative, the only advantage being the edit and refresh page dev cycle, and being worse in every other way. Perhaps Laravel could have changed my mind, as most devs there hated Laravel because of the magic (some then proceeded to implement control flows with typed exception throwing so maybe not the greatest bunch to discuss such things)
Plenty of "new projects" are really just WordPress deployments, and companies need PHP developers to customize it to fit their business processes. I'd imagine that's the market for 90% of PHP developers being hired today.
My point was that "PHP is thriving" cannot be deduced from the pull stats from docker. As the TLA does.
You now add an anecdotal evidence to underpin the "PHP is thriving". Which also is not a good argument.
That is not to say "haha php ded" - I'm merely and only making the point that in order to show that PHP is doing good, you need good arguments. Not a download stat, that on closer inspection, shows it's not really thriving, nor a story from your last job.
I also believe PHP still has its place. But haven't seen any solid evidence or arguments that this is the case and will remain the case.
PHP is a mature, established language. There is a large ecosystem of developers that actively use it, and large scale projects built on top of it. It is certainly not dead nor dying. It is just mature.
It is probably past its growth phase, nothing wrong with that. There is a very long list of languages that are arguably "better" that will never have a fraction of the success PHP enjoyed, will never see thr growth PHP saw, and will never be as widely used.
I don't even like PHP btw. But the HN crowd has some very warped view of how things actually are when it comes to programming languages and how popular/successful they are.
I'd even argue that starting a new project in php makes more sense today than it did 10-15 years ago. php now has a stable development cycle and mature frameworks and tools.
> So each "nextcloud" pull, will result in a pull for PHP too
I think each nextcloud build will pull the base PHP image. Ordinary pulls of nextcloud will not trigger a build but will pull the nextcloud built image. So If I built an image called "A" on top of "B" then 100 person pulled "A" then will not mean that "B" gets 100 pull. This is still one pull for "B" (assuming I did everything right from first time).
> Also, containers build on other containers. E.g. the highly popular phpmyadmin or nextcloud images build on top of php. So each "nextcloud" pull, will result in a pull for php too. Are those developers? Does that mean hundreds of millions less pulls?
When pulling images from dockerhub that are based on other images, the image is rebuilt from scratch each time? That doesn't sound right.
I really like the latest PHP release, 8.4. If anyone does any web scraping or HTML parsing, I've written a blog post about the big improvements made to the new DOM API: https://blog.keyvan.net/p/parsing-html-with-php-84
if you wanted a PHP object to use dot notation, then you'd have to change the string concat operator to something else. So you mention the "+" symbol, but then you confuse addition with concat and then you've just introduced JS issues into PHP.
I’ve used JS my entire professional career and never once had to worry about whether I was performing string concatenation or addition.
Besides, you probably access objects 10x more often than you concatenate strings manually. Way more often that I’m doing some sort of string split, filter, join.
For me, it’s using backslash as a namespace operator. You know how in Rust you’d write somepackage::foo? In PHP that’s somepackage\foo. I can’t stand looking at it. It sets my teeth on edge. There’s nothing objectively wrong it, but subconsciously it screams to me that whoever came up with this was a font of odd decision making. What’s next, & for multiply?
(I’m sure they had valid reasons for picking \. I don’t think they’re dumb. But seriously, I’d rather use an emoji or something instead. At least then code wouldn’t look like it’s full of escape sequences.)
And using a string concatenation operator that's distinct from the addition operator is one of PHP's best design choices. Naively everything passed to your script are strings, `"1"+1` evaluating to 11 instead of 2 would lead to so much wasted time.
This doesn't exist in perl since "3d7" is a numericy value and "3d7"++ becomes "4". The "d9"++ becoming "e0" only works if it's a stringy value.
> The auto-increment operator has a little extra builtin magic to it. If you increment a variable that is numeric, or that has ever been used in a numeric context, you get a normal increment. If, however, the variable has been used in only string contexts since it was set, and has a value that is not the empty string and matches the pattern /^[a-zA-Z][0-9]\z/, the increment is done as a string, preserving each character within its range, with carry ...
All the PHP jobs I saw while job searching required Laravel experience. Despite having 19 years experience with PHP and other frameworks, I was out of the running for those jobs.
The other day, I finally decided to kick the tires on Coolify. I had a few small projects lined up and thought it’d be a good fit. So, I mindlessly installed it and was pretty impressed at first. But then I discovered it was written in PHP, and I could feel myself starting to sour on it. That’s when it hit me — I was ashamed of my own bias against PHP.
IMO, PHP brings a few things to the table that keep it alive and kicking:
1. You can dynamically load code as you go. This alone allows Wordpress to download and use plugins straight away. You can't do this with Go and it's not as simple with Python.
2. The shared nothing architecture means it's almost trivial to scale out.
3. It's a language easy to pick up and the absence to watch directories and hot reload code gives it the fastest dev experience ever.
Modern PHP looks like Java, without the performance.
PHP is still incredibly big, just not fashionable in silicon valley.
The most surprising thing about this is that PHP developers are using Docker, I would have guessed that most of them are on bare metal or shared hosting. But I guess some of them also like modern deployment methods.
More as people who value simplicity and hackability.
Like if you use C# you obviously value structure and organization over many other things and aren't afraid of spending money, so deploying everything on your inhouse Kubernetes cluster makes perfect sense. If you use JavaScript you probably have some kind of compile step, and after deploying you need to somehow restart node anyways; Docker makes this easier and more reliable. But if you use PHP the relative advantage of Docker over rsync isn't nearly as big, but Docker adds a lot of incidental complexity.
And if you are small enough you probably want some kind of serverless hosting. With most languages that involves running a tool that creates a docker image and uploads it to that provider. PHP invented that a couple decades earlier and called it shared hosting. It's not as cool and has worse versioning, but functionally it fulfills the same purpose. It just happens to predate docker.
Visual Studio used to be basically mandatory for developing C# and costs $500 per year per developer or more (unless you are happy violating the license of the community edition). Paying for libraries is also completely normal in the C# ecosystem, it's easy to pay another couple thousand per developer for library licenses.
I think you tend to get good value for your money, developer salaries are expensive after all. But for any other language (maybe besides C/C++) this is much less common and the paid products that do exist are much cheaper.
How does this relate to docker? Only really in combination with the other attributes. Rsyncing files into production isn't as traceable, organized, structured or auditable as many of the Docker-based solutions out there. Those solutions can get expensive at scale, but if you use C# you are used to that
Hence the "used to". Both became options 8 years ago and took a bit to mature. Before 2016 everyone had Visual Studio licenses and on top of that got JetBrain's VS extensions.
So is Laravel which is pretty massive in its own right. Then with more large scale systems, Symfony is popular. PHP is a thriving ecosystem while other languages seem to have fewer options overall.
And nodejs is 9M a week, python is 8M a week, tensorflow 50M etc. Pull count doesn't mean anything if you can't group it in some meaningful way. I'm a 15+ year PHP veteran and I can safely say I will never use that language again. There are too many other far better choices out there especially when running in a containerized environment. No apache, nginx, FPM, php.ini custom health check scripts, loosing requests when the container starts or stops etc.
I honestly have not met, in real life, anyone that has thought PHP is dead. People that hated PHP? Oh yeah, I've met plenty of such people, often from using it in anger in pre-7+ days. And, (to be fair) for a language nerd, even new PHP is not exactly an exciting language. It's productive, but so very far from glamorous.
But dead? How can it be? Wordpress is an absolute behemoth. Laravel is large. Symphony finds plenty of use in the biggishOrg space. Even Drupal is not dead. Who in their right mind could think it's dead?