Live data from Hacker News

PHP in 2021

stitcher.io

131–140 of 309 posts

Re: PHP in 2021

#131

Before you call me a troll, know that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. My question is: why would anyone want to start something new with PHP in 2021? Is there anything that it does better than any other language/ecosystem? I feel like the community is full of (but not exclusively composed of—there are some gems like Caleb Porzio who write good stuff…

Look at the abject failure of Discourse. If it had been written in PHP then it would have completely replaced all current forum software. But the devs there hate PHP and went for a modern stack which is all but impossible to install except for tech professionals. In other words, they chose a tech stack which suited them as developers, and not which suited the end users of the software. End users love PHP because you…

>End users love PHP because you copy the files into a folder. That's why it's so popular.

As a person involved with a PHP + MySQL open source CMS, this is the pull quote for me.

The vast majority of web hosting I've experienced in the last 20 years offers PHP + MySQL out of the box, even on the crummy, ancient end of the spectrum.

Related to this, knowing that just about any flavour of hosting can run the CMS in real terms is enough to keep the development in check so a wider audience can use it. There's not much point in us adding extra features if the minimum ride height is beyond the reach of most users.

Re: PHP in 2021

#132

Earlier quoted context omitted.

You mean simply running Discourse (a Rails app) is so complicated no one wants to do it? And if it was simply PHP boom business would have been booming ? I find that a bit hard to believe.

Have you tried installing Discourse? It's not that straightforward. And then there's also the issue that you need a working e-mail setup, even if you only want to set up a local test environment.

And how would php solve the e-mail setup issue? I'm not saying it's straightfoward and I don't know Discourse at all. If they have dependencies like redis etc then yes it's gonna be more complicated. Just don't think a framework like Laravel would have been easier.

Re: PHP in 2021

#133

Before you call me a troll, know that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. My question is: why would anyone want to start something new with PHP in 2021? Is there anything that it does better than any other language/ecosystem? I feel like the community is full of (but not exclusively composed of—there are some gems like Caleb Porzio who write good stuff…

To answer the question. It evolved a lot over the last years, it has a thriving community, you will always find answers to your questions, there are a lot of developers and I personally think the community around the core is quite competent at what they're doing with the language.

We started one of our biggest projects on PHP 5.6 and Symfony 2.x years ago. The maintenance process and the upgrades were absolutely painless. If you're disciplined, you can probably do this with most of the languages, but we constantly were able to upgrade, so that we are running on PHP 8 now and the latest Symfony version. Of course we had to pull certain parts that started to be too big out of the app, some are now node, some are Symfony, some Java, but the core is running on the latest versions and the evolution of the language and the performance improvements that we had with the upgrades over 9 years are incredible.

Re: PHP in 2021

#134

Before you call me a troll, know that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. My question is: why would anyone want to start something new with PHP in 2021? Is there anything that it does better than any other language/ecosystem? I feel like the community is full of (but not exclusively composed of—there are some gems like Caleb Porzio who write good stuff…

"They care nothing about elegance and have but a dim conception of larger CS/SE principles." / "I really see no reason to not choose a better tool in this day and age."

Every time there is a PHP news update these kind of posts come out. They claim some vague experience in PHP and then go on to list all these other wonderful languages you could be using instead and that insinuate you must be a bit of a shit developer to be using PHP.

Unfortunately this troll has been well fed.

Re: PHP in 2021

#135

Earlier quoted context omitted.

You mean simply running Discourse (a Rails app) is so complicated no one wants to do it? And if it was simply PHP boom business would have been booming ? I find that a bit hard to believe.

As a front-end developer I can agree with that. Many times when I've wanted to install something for my needs, like forum engine or something similar, I was looking only for an PHP option. Why? Because it really is a copy-paste process with typing credentials to your database into dedicated file. No need to know any language/framework-specific commands, and no need to be overwhelmed by missing dependencies. And in hu…

Discourse is a pretty complicated piece of software (relatively). They do: mailing list, discussion forum, long-form chat room, This isn't gonna be some static blog, it's feature heavy. It needs redis, it needs some real-time chat capabilities etc etc. Also the choice to use a framework (Rails in this instance) was sound since it's complicated. So when comparing deployments you need to compare it to the php equivalent (Laravel). I think deployment and memory footprint are gonna be quite similar then.

Re: PHP in 2021

#136

Before you call me a troll, know that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. My question is: why would anyone want to start something new with PHP in 2021? Is there anything that it does better than any other language/ecosystem? I feel like the community is full of (but not exclusively composed of—there are some gems like Caleb Porzio who write good stuff…

Dont forget about content websites. PHP has pretty big dominance in usage and quality of CMSes. And i dont mean just wordpress and drupal (which are pretty meh). Its things like Craft CMS or Kirby CMS. Also open source ecommerce - prestashop/opencart/woocommerce.

So if you are devshop doing lot of CMS development and start doing webapps/apis then something like Laravel makes lot of sense.

Re: PHP in 2021

#137

PHP has been in a pretty good place since 7, IMO. These are some great developments. I would say that Laravel is an extremely high quality framework (on par with and even in some ways better than Rails) that nobody should be ashamed to use. It's unfortunate that the stink of old PHP is so powerful and that salaries are still lagging so far behind.

> I would say that Laravel is an extremely high quality framework

I strongly disagree. My experience with Laravel made me see it as a medium quality framework with many flaws. I'll point out to a few of them.

The source code quality of the framework is not very high, and locally very poor. For instance, you can't autocomplete normally with an IDE unless you load extra declarations of the magic. Sometimes functions return values of varying types. And, last but not least, there are many cases where a call to a method on on object is intercepted by the magic `__call()` and redirected to another object created on the fly.

As pointed above, the abuse of magic means browsing the Laravel API is a nightmare. You won't see methods that you may call. Overall, the official documentation is tutorial-oriented, with an abuse of videos. I have not worked with Laravel for more than 2 years, but at that time I could not find a public reference documentation.

Laravel is extremely slow. Speed or concurrency is not a problem for many web sites, but when your framework is 10-100 times slower than others, you hit performance problems sooner. I suspect the magic and a few design choices (e.g. not using PHP native sessions) mean that a Laravel application can't get fast.

Re: PHP in 2021

#138
post #119

Before you call me a troll, know that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. My question is: why would anyone want to start something new with PHP in 2021? Is there anything that it does better than any other language/ecosystem? I feel like the community is full of (but not exclusively composed of—there are some gems like Caleb Porzio who write good stuff…

I'd love to debate the use of PHP vs. Ruby and Elixir, but your arguments basically are: - The community is full of people who just care about hacking something together. - Ruby/Elixir are fantastic, developer friendly, and have solid foundations. The first happens with every popular scripting platform. Is JS community full of PhDs? The second is highly subjective. Ruby is problematic, because it's supported by one f…

Moving from PHP to ruby, language speed has never happened to be a subject.

During coffee time banter, sure, but in real performance related issues, what we face came down to query optimizing, cache management, algorithmic issues and data pre-processing.

We didn’t even hit the “let’s write this in C” moment nor debated about moving parts of the code to faster systems/libraries. I’m not saying it will never ever happen, just that ruby’s sheer speed doesn’t seem to have a practical impact other than slightly higher hosting cost perhaps.

Re: PHP in 2021

#139
post #107

It is a great language to put food on the table. Especially in Europe it is still the dominant backend language. If you want to have flexibility on where you work it is a good language to know. You have the productivity of a scripting language but still great static analysis tools that help you out. It really fills a sweet spot that no other language does. Yes, Node has Typescript but then you have a super slow compi…

The elitists who constantly hound on PHP's deficiencies as if developers haven't heard about them for the last 20 years are the same types of people who build a fancy side project that never sees the light of day because it's massively over-engineered in some obscure flavor-of-the-month language. Your customers don't care what's under the hood beyond your ability to provide value to them. If PHP lets you ship faster…

That a lot of the issues that were "not a problem" in the 5.x days are now addressed in PHP 7 and 8 is evidence that the technical criticism was valid and hardly "elitist".

There are many successful projects in many different languages. You're using one of them right now. That claim only PHP devs care about shipping useful products is extremely silly.

Re: PHP in 2021

#140

It is a great language to put food on the table. Especially in Europe it is still the dominant backend language. If you want to have flexibility on where you work it is a good language to know. You have the productivity of a scripting language but still great static analysis tools that help you out. It really fills a sweet spot that no other language does. Yes, Node has Typescript but then you have a super slow compi…

> PHP ... I think Haskell fills a good niche here.

well, that escalated quickly

Post reply on HN