PHP Popularity: Is it decreasing and what to do about it?
141–150 of 166 posts
Re: PHP Popularity: Is it decreasing and what to do about it?
#142Earlier quoted context omitted.
It changes deployment because you need to flush the opcache after deploying new code, for example; you need to install composer packages, restart the app server (if you use one), etc. I mean obviously you still upload files, but there are more steps involved in a proper deployment. Once you start getting into zero-downtime deployments, you'll quickly see the need for both application servers like Swoole or RoadRunner…
I mean... using a symlink to the deployment root gives a quick atomic swap. You update the link, then reload the server config, no downtime and no partial deployments during a request. This also solves for the opcache freshness as well if I recall correctly. (It's been a little bit since I've done any PHP work)
And then again, you’ll end up wondering why your servers should waste cycles upon cycles for executing the same bootstrap code over and over again, if they could instead only do that once, keep the app in memory, and only execute the request handling code… and just like that, you’ll end up with Octane, or Swoole, or what-have-you.
Re: PHP Popularity: Is it decreasing and what to do about it?
#143Earlier quoted context omitted.
That can work for a while but it doesn’t attract new developers, and it tends to have legacy projects be replaced outright with new ones in better languages.
If anyone needs a quick scripting language, there’s JavaScript or Python. There’s no niche that PHP needs to fill except for “a language for people who don’t want to move off of PHP.”
The fatal flaw in my opinion was not taking the language itself more seriously 20 years ago. The culture of laxness around things like type coercion, ignoring errors by default, being inconsistent about positional arguments and typing or nomenclature, etc. is so deeply ingrained that major improvement are much harder and will likely require advanced automated tooling. I left the community in the mid-2000s after getting burned out by the endless stream of security and correctness bugs caused by the language and culture – my favorite was the time a detailed bug report for functionality not matching the documentation was WONTFIXed since it was working as the core developers intended & they didn’t feel like updating the docs – but having had the misfortune of being involved with a PHP project again, the only big improvement I can think of was that register_globals isn’t the default. You still routinely see bugs caused by e.g. inconsistent array function parameter ordering causing errors which are silently suppressed despite our configuration having logging enabled for that class of error and the built-in linter won’t report. There was no reason to waste time on that in 2003, much less 2023.
Re: PHP Popularity: Is it decreasing and what to do about it?
#144Earlier quoted context omitted.
You don't have to remember that, any IDE will yell at you. I don't find it inconvenient to write PHP or JS syntax, it's completely trivial for a professional.
Don't be such an apologist for terrible careless programming language design, expecting professional programmers to tolerate IDE's "yelling at them" about unforced language design flaws and loaded footguns, using terribly designed languages that were mindlessly thrown together by anti-intellectual amateurs like Rasmus Lerdorf, a self proclaimed "not a real programmer", who says he doesn't even like programming, who d…
Also, server side JS is an absolute hard no for many, many server side devs who became server side devs after suffering with JS as full stack devs.
Re: PHP Popularity: Is it decreasing and what to do about it?
#145The 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: * Moving from static HTML to dynamic server code was a matter of changing file extension and adding PHP tags. * Many shared hosting services supported PHP. * Deploying was a matter of copying files to the server. Projects that start…
To be honest apacha/nginx + php with laravel is probably few of the most stable web serves I've build. IMO it's still a lot lighter and easier then Java or C#. But yeah the old script kiddie days were great. And I do thing we should encourage users more to be more wild for small projects and just build something without a framework.
It's hassle free to host on a shared host and it'll be there forever
Re: PHP Popularity: Is it decreasing and what to do about it?
#146Earlier quoted context omitted.
That can work for a while but it doesn’t attract new developers, and it tends to have legacy projects be replaced outright with new ones in better languages.
If anyone needs a quick scripting language, there’s JavaScript or Python. There’s no niche that PHP needs to fill except for “a language for people who don’t want to move off of PHP.”
Re: PHP Popularity: Is it decreasing and what to do about it?
#147PHP 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 any…
Re: PHP Popularity: Is it decreasing and what to do about it?
#148Earlier quoted context omitted.
Jup jup. "PHP is used by 77.5% of all the websites whose server-side programming language we know." https://w3techs.com/technologies/details/pl-php
That's because of Wordpress, but still.
Re: PHP Popularity: Is it decreasing and what to do about it?
#149PHP 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 any…
That is how most modern web systems operate. It's very rarely a problem, because decent error handling (built in to most frameworks) limits the scope of these sorts of issues to a single request. IIRC, all of the major Node.js HTTP frameworks will catch exceptions for you and respond with a generic 500; I'm not sure what sort of system you had where your errors were bubbling up further.
Re: PHP Popularity: Is it decreasing and what to do about it?
#150Earlier quoted context omitted.
What's the JS equivalent of "place an index.php file in a folder to deploy"? What's the JS FOSS equivalent of ProcessWire as a CMF + CMS? What's the JS equivalent to e.g. DreamHost and other drag + drop hosts? (Legitimately curious, and I'm mainly inquiring after equivalents-for...better-thans would definitely be interesting)
What is the PHP equivalent of writing your front end and back end in the same language so you can share libraries and data and not have to switch gears between two different languages each time you look up or down the stack? There is a HUGE advantage to using the same language in the browser and on the server, and PHP isn't ever going to displace JavaScript in the browser. So JavaScript it is. That ship sailed a LONG…