News for hackers. Stuff that matters.
Re:PHP in 2019 by mattferderer on Wednesday May 15, 2019 @09:49AM (#19919333)
I think the easiest thing to forget is what made PHP popular was how easy it was to get started writing software that worked good enough. The barrier to entry was incredibly low. It caused a lot of bad code & gave PHP a bad reputation but a lot of good was also made from it.

PHP made a lot of careers for developers as they were able to fake it until they made it while learning how to code & providing significant value to a businesses.

While PHP is nothing like its former self, most people who developed web apps in the first decade of the century will probably always remember PHP for what it was.

Re:PHP in 2019 by gwbas1c on Wednesday May 15, 2019 @11:31AM (#19920403)
The thing that I like about PHP is that I can mix HTML, code, and database queries into a single file.

This is incredibly useful when learning basic web development, even though it doesn't scale for more complicated applications.

It's also incredibly useful when trying to bang out a simple experiment.

Re:PHP in 2019 by zer00eyz on Wednesday May 15, 2019 @04:51PM (#19923649)
In the world of machining people will often build a tool for a job. Its a one off, or something that will rarely if ever be used again.

These features of PHP are still eminently useful if you have to do the dirty one off. You can eliminate a massive amount of time pressure (an emergency or time invested vs time saved) if you dont have a ton of overhead that comes with modern frameworks.

Re:PHP in 2019 by strictfp on Wednesday May 15, 2019 @12:11PM (#19920832)
It also allows you to utilize and extend the full http protocol, something which most "serious" frameworks hinder.
Re:PHP in 2019 by wyqydsyq on Wednesday May 15, 2019 @10:41PM (#19925699)
PHP doesn't have anything to do with the HTTP protocol, Apache/Nginx/etc handle HTTP and simply call your PHP script with some global variables set to values parsed from the HTTP request
Re:PHP in 2019 by strictfp on Saturday May 18, 2019 @04:16AM (#19946326)
No, but PHP does not get in your way unlike many other web frameworks.
Re:PHP in 2019 by juangacovas on Wednesday May 15, 2019 @12:10PM (#19920812)
And many of us took the jump and refused to do things that way. You're wrong, PHP scales and you CAN do separation of concerns and have pretty, maintanable code, using a framework or not: just a matter of knowing what you are doing
Re:PHP in 2019 by barbecue_sauce on Wednesday May 15, 2019 @02:06PM (#19922078)
It's pretty clear that he meant mixing HTML, code, and database queries into a single file was what didn't scale, not PHP itself.
Re:PHP in 2019 by munk-a on Wednesday May 15, 2019 @04:21PM (#19923341)
I think you're missing the point of the comment - when it comes to prototyping PHP is incredibly easy to whip out a buggy test thingy in minutes that breaks all best practices but still lets you prove a concept or prep a demo.
Re:PHP in 2019 by pavel_lishin on Wednesday May 15, 2019 @11:35AM (#19920438)
> PHP made a lot of careers for developers as they were able to fake it until they made it while learning how to code & providing significant value to a businesses.

Unfortunately it also provided a lot of careers to developers who never got to the "make it" stage.

Re:PHP in 2019 by godot on Wednesday May 15, 2019 @01:04PM (#19921453)
I think it's a bit harsh and elitist to label this with "unfortunately"; for developers like the ones you mention, often their goal or aspiration is not to work in a FAANG or silicon valley startup; they want to make a decent living as a developer in their city and this provides that career for them. Many of those companies aren't trying to be the next unicorn, they're just small dev teams trying to maintain a web site for their business.
Re:PHP in 2019 by virtuexru on Wednesday May 15, 2019 @01:04PM (#19921460)
Why on earth is that unfortunate? Seems like a positive thing to me, even if some people don't make it to the pinnacle of their craft so what? If someone has gainful employment and meaning in their life I see that as a net positive.
Re:PHP in 2019 by pavel_lishin on Wednesday May 15, 2019 @02:28PM (#19922287)
> Why on earth is that unfortunate?

Because many times, they write bad, buggy software. Because other people end up having to maintain it, or fix it, or replace it. Or they release things like plugins that malfunction, but because they're the best out of a set of bad options, end up being the de-facto solution that everyone has to deal with.

I'm not talking about people who build software that works ok, but has bad patterns. I'm talking about people who write cash register software that uses floating-point math to do calculations, or Wordpress plugins that fill up error logs with garbage or nearly DDoS sites because they don't understand how to write efficient code.

Not that I've done any of the above as an early PHP developer, no sir...