Live data from Hacker News

PHP in 2021

stitcher.io

281–290 of 309 posts

Re: PHP in 2021

#281

Earlier quoted context omitted.

> I guess companies that use Discourse and have huge traffic can pay a bit more, nothing wrong with that. The point being that said numbers aren't big traffic, they should be handled by a Raspi. But for the sake of argument: Discourse is a painless move upwards for big budget and/or big knowledge entities. Nothing wrong with that. On the other hand Discourse isn't a replacement for low cost, decentralized, easy to de…

So not sure I'm following, the php solution can handle huge traffic at a low cost with a conmparable feature set? How do they achieve that then? Taking a look at phpBB it looks like they are not using a framework (e.g https://github.com/phpbb/phpbb/blob/master/phpBB/posting.php ). This is good for performance but pretty shitty for an OSS proeject, anyone looking to contribute here needs to start from scratch. Discour…

To be more fair, the PHP forums tend to be much older codebases, before standout frameworks and index.php front controllers.

Much like Wordpress and phpMyAdmin, these projects are basically victims of their own success.

Re: PHP in 2021

#282

Earlier quoted context omitted.

You "CAN" upload laravel to bluehost or any shared host and it will work, you may need to cut a few bits, or use external services for redis/sqs/etc if you want to use those things, or you could just use file/database for sessions/caching/etc. I mean I started laravel on shared hosting, why did I use laravel for most of my career? Because the job I was hired for was to build a custom CRM for a book business, I was le…

Shopify is Ruby based btw... But I'm not taking anything from PHP, it's a sound career choice with lots of big platforms (Wordpress/Magento). Just not sure I understand the deployment story. Deploying Laravel should be as easy or hard as deploying Rails.

Shopify is hosted.

Re: PHP in 2021

#283

Earlier quoted context omitted.

That is because everyone is writing SPAs with node and thus only needs an api like express for the backend stuff.

Even for writing APIs a monolithic web framework can be useful. We're building a Django + React web app, and Django brings many things to the table, for example the admin panel, an opinionated structure, and many other goodies. Much better dev experience than just Express for a small team, IMO.

Why not Django REST Framework if you're feeding an SPA?

Re: PHP in 2021

#284
post #249

Earlier quoted context omitted.

> Laravel is not the top pick for highly-concurrent idempotent microservice on Kubernetes, Taylor Otwell would like to introduce you to Larvel Octane, i.e. support for swoole/workerman with 6k+ reqs per seq on a basic desktop. Laravel with swoole basically makes it as performant as elixir/phoenix.

But do you have to rewrite all your code async-style? And what are the implications for using non-async PHP libraries?

Presumably, you pick/choose which would use swoole or be delivered on php-fpm maybe run both with nginx proxying swoole, then your old code would just run sync and newer could run async if required --maybe for things like chat/websockets and not for just static pages.

Re: PHP in 2021

#285

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…

Maybe that is the experience with Laravel, but I had the opposite experience with Symfony.

Re: PHP in 2021

#286

Earlier quoted context omitted.

I think you're thinking of Next/Nuxt. I'm a laravel dev but have tried every framework under the sun cause I get bored. Next/Nuxt are basically react/vue SSR / Server Side Rendering or SPA frameworks... which seems more like Angular..no? Nest.js is a fullstack backend framework more like fastify or express and has guides on connecting databases, graphql, etc.... Personally, if I were going to go with node, I'd choose…

The last sentence in their philosophy section reads " The architecture is heavily inspired by Angular." https://docs.nestjs.com/#philosophy

Maybe they were inspired by the way it was built/laid out, but angular is more in the vein of react/vue.

Nest.js is more like feathers, actix for rust, flask, lumen, etc... it's not as opinionated iirc last time I played with it... so there's not a specific way everything is organized like a rails or laravel project... if I were doing node it'd probably be nest, but w/ swoole/octane and knowing laravel inside/out I'm gonna lose time/productivity switching to anything else, so I stick w/ what I know.

Re: PHP in 2021

#287

Earlier quoted context omitted.

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.

Obviously if the project requires working emails, PHP cannot solve it. If I understand the parent comment correctly, what it says is that sending mails with PHP is usually less problematic than other languages (IIRC from the last time that I used PHP -several years ago- their mail() function works OOTB almost everywhere, even on shared hosting, and is usually used by default or as a fallback).

Re: PHP in 2021

#288

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…

The "copy into a folder" is true because PHP is usually configured within HTTPd, but it's also true for any other script that is configured to be loaded on demand (CGI, Python). But you still need to manage a server unless the server is manager for you. However, shared hosting used to offer HTTPd+PHP only. With other languages usually you have to manage the server cycle by yourself, that's why it's not easy as copy-paste.

Re: PHP in 2021

#289
post #220

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…

We recently picked PHP for a large web application. The usual choices at our teams are Java11, Golang, and Typescript (+ a few teams that use Kotlin, C# and Rust). Many team members however also had experience with PHP in their career, but the main reason for us to pick PHP was Laravel's ecosystem really. The amount of features and scaffoldings that you get out of the box is just crazy. It gives you proper authentica…

You‘re right, it‘s insane what Laravel‘s ecosystem has to offer out of the box. However, most of these features save you lots of development time AND are free to use. What makes me unhappy here is that a company and its employees benefit from these ‚free‘ features and at the same time they don‘t condescend to mention it in their portfolio or even job listing because it‘s not cool enough.

Re: PHP in 2021

#290
post #74

Earlier quoted context omitted.

The first comment in this thread already answered your question. >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. And add to that PHP both a language and its VM get way more improvement than Ruby.

How do you measure this improvement compared to Ruby? At least in Ruby/Rails case it's backed by Shopify, which isn't very far from being as big as Oracle (market cap wise). Shopify invests heavily into Rails and in Ruby. Other big companies are Stripe (Ruby only), Github etc. But Shopify is the big deal since it's becoming a FAANG stock as of late. Now for sure PHP has a big following, good companies based on it (th…

>At least in Ruby/Rails case it's backed by Shopify,

Recently backed. Backed in the sense as investment into it. Ruby and Rails now finally have capital behind it for investment. Ruby JIT being worked on specifically designed for Rails from Shopify, running on Master with better QA etc. But they are comparatively recent.

Most of these improvement will take time. PHP on the other hadn't are already seeing those improvement today. And they were work that has been going on for past 4 - 5 years. So in that sense it is improving faster.

Post reply on HN