Anyone have stats on this?
Anyone have stats on this?
PHP is absolutely relevant, I'd think, by many peoples' measurements. But... we're on a 'hacker' site and people love to dump on PHP. PHP powers a large portion of internet sites. One estimate from w3techs is ~80% of sites with a known server side language are PHP.
Yes, much is WordPress. If you estimate that half of that is Wordpress, that still would leave... ~35%-40% of sites using PHP. Maybe even that is too high. What if it's 30%? That's a large number, both in terms of percent and absolute numbers.
Yes, PHP is 'relevant'. The ecosystems (Symfony, Laravel, etc) are pragmatically iterating, evolving goods ideas from a wide spectrum of web platforms. The language itself is similarly pragmatic, adopting new features, deprecating legacy stuff, and moving forward. The language is roughly 3x faster than it was 10 years ago, while retaining a lot of backwards compatibility.
The language itself along with various frameworks offers a good combination of speed of development, flexibility and rigor. The 'shared nothing' default makes it easier to reason about for many problems. Need to write a small shell script? Easy in PHP. Need to scale up to large loads? PHP can do it. There will be scaling concerns in any large setup - a PHP platform will likely have similar problems that other language/stacks will encounter at similar load.
So again, yes, it's relevant. There will be some other response saying "no", and then ... we'd have to define what you mean by 'relevant'... :)
Popular? Growing? Evolving? Uptick in usage for many problem spaces? Easy to scale?
I'd say 'yes' to all of those.
Headless WP is becoming very popular too, and it seems to fill the same role. I've never used it, but I would imagine it takes just as much knowledge to build an SPA as any other backend framework like Laravel or Rails.
No Linux terminal knowledge need it or worry about Nginx, SQL, or iptables configuration.
Yeah most of those cpanels hostings are bad for scale, but for a lot of new devs allowed them to deploy without having to be a sysadmin
I'm not a Python developer, but it is probably true that Python is a better designed language and has more bells and whistles as language, like decorators, operator overloading and modules. Python is also used in more domains than PHP.
But if you look past some of the weird design choices, bad reputation and the packaging as web only language, you will find a JIT-ed & typed dynamic language with good performance, FFI for easy C glue, good threading performance that is not suffering from a GIL like Python, a large & mature standard library, can be used everywhere from a small script to a large monolith, a true diamond in the rough.
Today I worked on a importing system that takes an HTTP stream to read a CSV file line by line to mangle it and rewrite it simultaneously to a FTP stream, never keeping the entire file in memory nor downloading it entirely to disk first, and by only using functions from the standard library.
I'm not saying you can't do this with Python, you probably can, or any other language, I just want to dismiss the idea that PHP is only suited for typical web tasks, PHP is a versatile tool that has every potential to expand outside of its traditional role.
I still find it has one of the best developer experiences for web applications, out of all the tools I've had to learn through agency work.
Still compelling for people who see spiky to high traffic and are happy to have scale reduced to an accounting/budgeting problem, of course, and I'm pretty sure Laravel has something like this.
[1] https://aws.amazon.com/blogs/compute/introducing-the-new-ser...
Or maybe I'm just getting fucking old & grumpy ;)
Modern JS (modules, web components, fetch, ...) is rather expressive and powerful, and you absolutely do not need to pull in a framework and twelve third-party hype technologies to get a small project up and running.
Etsy still uses PHP, as does Vimeo and Wikimedia. A few other launched-in-early-oughts web properties rely heavily on it too (e.g. Flickr).
PHP is easy to deploy, atleast from the start, but was difficult to use compared to python and ruby. It's deployment model also encouraged people to edit directly on the server, which lead to all kinds of problems. So it got a bad reputation.
I have heard that it has fixed many of it's inconsistencies, but many have already moved on. The ones still using it are either stuck, or happily quiet.
Only to mention a few of the newest and hottest PHP tools. Then you have all the heavyweight, widely tested and used like Symfony, the Laravel ecosystem, Yii Framework, etc.
PHP has never been better and healthier.