Live data from Hacker News

A look at modern PHP

lwn.net

341–350 of 610 posts

Re: A look at modern PHP

#341

Earlier quoted context omitted.

You can do this in Spring Boot/ Java, with one Java class and one config file. And it will likely be an order of magnitude more scalable & reliable than the PHP, having proper logging, security features, etc. Whereas such PHP systems in my experience tend to be unreliable, in need of maintenance and often broken. The Java/ Spring Boot option will also take you all the way to a high-end commercial system/ large websit…

You installed a framework Spring for a simple feature to grab some text from a POST request and dump it into a database. Since in general you don't have thousands of users sending feedback at the same time I don't need a framework and if you know how to correctly create SQL statements you don't need a framework for SQL. There is nothing to log, if the db call fails you can put some text in a log file or do a curl to…

I'd use whatever lightweight and secure I can find at a moment.

Simple file upload without any future expansion plan doesn't need hours of discussion.

Re: A look at modern PHP

#342

Earlier quoted context omitted.

You're entirely missing the point by focusing on why someone may or may not have used the wrong words - with an application written in many other languages, you have to do something special to be able to update some server-side code and have that new code be run when you next hit the server.

If pointing out that he's using the wrong technical term is 'missing the point', I'm not sure there was one to begin with. most examples of why php is so easy to deploy show it with hello world examples you'd never encounter in the wild. yes, you can edit the php code directly on the server that is executing it. just like with python, nodejs, ruby ... and even java if you're not worrying about scalability. there is r…

I can, on my local server, change the code, hit it again, and have my changes reflected in what happens. Doing that with Python, Node.JS, Ruby, or Java requires extra configuration. That's the point.

Re: A look at modern PHP

#343

Earlier quoted context omitted.

Ruby on Rails. Django. Revel. Actix.

RoR and Django are probably the closest (Laravel was inspired by RoR). Still, I don't think they support all those features. Like I can't find any official RoR support for payments, full text search, encryption, pagination, scheduled tasks or building CLI commands. With Django, full text search seems limited. It supports PostgreSQL, but I couldn't find first-party integration for Algolia, Solr, Elasticsearch etc. or…

Why would RoR bake payments support into the framework? RoR is there to tackle common web application tasks, payments is there for maybe 30% of web apps / services. There's an active debate on what popular libraries should be included in Rails, and all the features you listed can be found in libraries if they aren't in Rails already.

Re: A look at modern PHP

#344

Earlier quoted context omitted.

Ruby on Rails. Django. Revel. Actix.

RoR and Django are probably the closest (Laravel was inspired by RoR). Still, I don't think they support all those features. Like I can't find any official RoR support for payments, full text search, encryption, pagination, scheduled tasks or building CLI commands. With Django, full text search seems limited. It supports PostgreSQL, but I couldn't find first-party integration for Algolia, Solr, Elasticsearch etc. or…

Actix-web is a web framework, but a rather lightweight one. It doesn't really compare to django/rails/laravel.

Re: A look at modern PHP

#345
post #112

The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN. Here are some facts: - Symfony was the backend framework with the most contributors in 2019 [1] (yes, out of any backend framework written in any language) - PHP has more active contributors than it ever had [2] - Laravel is one of the most used frameworks in the world…

The only problem I have with PHP is that it is the C++ of backend scripting languages.

Re: A look at modern PHP

#346

This may sound hurtful but hear me out - One thing worth mentioning why someone would not want to use PHP in 2020 is that a PHP programmer is looked down upon by other programmers. And im saying this without hate or malice. I love PHP since I was a PHP dev from 5.2 - 7.0. I built PHP libraries and WordPress plugins that have helped many people. Ive since moved to Node because PHP jobs have dried up in my country. PHP…

In fairness the wheel has turned and node developers are seen as not respected. If you haven't moved to go/rust/serverless by 2018 the cool market has moved.

When I got started in 2000, php developers weren't as smart as perl developers. Then it was asp. No serious business would use php over asp. Java developers always had this attutiude but they were always treated as second class from c++ developers who were treated bad by c developers who were using a toy language compared to asm.

At some point 2006/2007 php became cool. But then the facebook movie came out and php was uncool again. Ruby on rails was better (unless you were twitter and wanted to scale). Then node. Go. Serverless.

PHP has always been anticool and looked down on. You need a strong sense of self to get involved.

Re: A look at modern PHP

#347

Earlier quoted context omitted.

Wait, Go hasn’t had any revolutionary change since it arrived 10 years ago. It is still basically the same language/package. I’m not saying that is bad, but why does a language need to be constantly revolutionary if it solves what it sets out to solve well? Catch up to other languages? You can easily argue the opposite, that other languages has finally catched up to PHP, ease of deployment, ease of horizontal scaling…

Other languages haven't caught up on PHP about ease of deployment. If you need a fast hot reload, it isn't trivial in other languages. PHP does it with no effort. Save and refresh runs the updated code instantly, not to mention asking people to run PHP app is far easier as every general hosting provider has PHP installed. On the other hand, language structure is quite behind others but can't blame when it had been ar…

That's not hot reload, and pretty much every language has frameworks that are capable of that.

Re: A look at modern PHP

#348

Earlier quoted context omitted.

I'm a PHP "hater", so take this for what it's worth. You are very close to implying that the language doesn't matter if you can hire developers and there are a lot of good packages in the ecosystem. Having worked on several PHP projects (Most being version 7.0+ and zero of them being older than 5.3), the languages is STILL full of gotchas, and it's a huge drag on productivity. I assert that this DOES matter. Even bas…

I've done plenty of PHP programming (including modern) in the past. I'm excited about recent developments. Not sure about the productivity claim. I once wrote from scratch (frameworks excluded) backend and frontend (version 1) of a multi-tenant, cloud-based video-sharing platform with PHP as the backend (aws cloud) in a matter of weeks. I once wrote, from scratch (frameworks excluded), an entire backend (and front-en…

Can you attribute that specifically to PHP making that possible? Why couldn't an equivalently capable peer use Python to do the same?

Re: A look at modern PHP

#349

This may sound hurtful but hear me out - One thing worth mentioning why someone would not want to use PHP in 2020 is that a PHP programmer is looked down upon by other programmers. And im saying this without hate or malice. I love PHP since I was a PHP dev from 5.2 - 7.0. I built PHP libraries and WordPress plugins that have helped many people. Ive since moved to Node because PHP jobs have dried up in my country. PHP…

Oof you have no idea how Ruby devs are shat on, sometimes by other miserable Ruby devs.

Re: A look at modern PHP

#350
post #112

The amount of misinformation, false claims and unsupported statements in this thread is mindblowing for the quality that I've been used to see on HN. Here are some facts: - Symfony was the backend framework with the most contributors in 2019 [1] (yes, out of any backend framework written in any language) - PHP has more active contributors than it ever had [2] - Laravel is one of the most used frameworks in the world…

Majority of the HN commenters argue irrelevant points or are trolls and have never gone deep in any technology to be an expert and comment about it. I've seen absolutely moronic comments here. You should see the comments on 'React' or 'Java'. I'm pretty sure most have never written a "hello world" equivalent in it. It's cool to hate something popular.

Some of commenters are "ex" php develops. For me PHP was painfull but I didn't know that until I moved on to Ruby and now Go. I would never go back to PHP programming(i tried few years ago) just like I would not go back to Windows(except for budget or political reasons). PHP was fun back in the day because you could host it anywhere and truth be told it was an easy scripting language to learn but I don't see many reasons to use it today. Not that you can't build great products or scale it but I can no longer enjoy programming in PHP.
Post reply on HN