Live data from Hacker News

PHP in 2021

stitcher.io

241–250 of 309 posts

Re: PHP in 2021

#241
post #156

Earlier quoted context omitted.

You can also do it in one golang file. Or one python file. Or one nodejs file. With PHP you have more moving parts, Apache/Nginx with their configuration and then the PHP script. With golang/rust/python/nodejs you have direct access to the webserver and more control, but the same simplicity.

>With PHP you have more moving parts, Apache/Nginx with their configuration and then the PHP script. With golang/rust/python/nodejs you have direct access to the webserver and more control, but the same simplicity. From my limited node experience I had to setup Nginx too and then connect it with node, and setup some manager like "pm" to keep the things running. When people say PHP is simple to setup they mean the cus…

The OP I responded to was about having a quick script up and running. Of course for a fully fledged app you might have a reverse proxy or similar.

Also PM is just a simple hypervisor, it doesn't have any logic, while Apache and Nginx do.

Re: PHP in 2021

#242

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 have experience with JS (node) and PHP, and between the two I would choose PHP for any real website. I appreciate a lot of things JS gets right (including PNPM vs Composer), but Node is far less reliable and IMO PHP is the better language. My Rails friends all recommend against using Rails for any new projects. I never bothered to get the laundry list, as that is enough to convince me not to learn a new language. I…

I don't get why your Rails Friends would not recommend it for new projects. Care to elaborate?

Re: PHP in 2021

#243

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…

So, one reason to use PHP instead of Ruby is that you will need 100x fewer servers. When you need 100x fewer servers you might also need 100% fewer devops people.

Care to back that up or are you just trolling?

Re: PHP in 2021

#245

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…

> that I worked with PHP for two+ years maintaining both legacy codebases and writing new code with Laravel. might seem like trolling, but from what I've seen, Laravel encourages bad developer practices such as static code etc, while Symfony encourages good OOP practices. so Laravel in itself is attracting specific audience with different priorities than Symfony, so it may explain your main complaint about PHP code w…

As a PHP developer, this is spot on. I'm biased, though. I believe symfony is a vital component of modern PHP.

Re: PHP in 2021

#246

Earlier quoted context omitted.

> There are likely a large number of "PHP" jobs available overall though which could bring average pay down, the low-end is low because there's such a low barrier to entry for something like WordPress development. I was about to write exactly that. There is a long tail of relatively unskilled developers who technically count as PHP devs. I also do not perceive PHP salaries to be lower relative to other web dev stacks…

I guess I can only speak for what I've seen in New York, where it seems like PHP dev salaries are a bit stunted. WordPress or otherwise.

It's the same everywhere outside Silicon Valley. PHP rates are consistently 20% lower than, say, Ruby, Python or JS.

Re: PHP in 2021

#247

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…

> why would anyone want to start something new with PHP in 2021?

What can you make in X language than I can't make in PHP? And vice versa?

Don't get me wrong, I fully support the "select the right tool for the job", there are obviously better languages and frameworks for different kind of tasks, but let's just consider the context in what PHP is usually used in.

I get that people dislike a syntax. I loathe Python, basically because indentation actually controls how and whether your software works and I can't use indentation for organizing the readability of my code.

But that doesn't mean that I would ever argue against the use of Python; again - what can you make in Python that I can't make in PHP? And the other way around still.

inb4 "But PHP doesn't do async" - [fibers](https://wiki.php.net/rfc/fibers) is a start on that journey. We've managed so far.

Re: PHP in 2021

#248
post #243

Earlier quoted context omitted.

So, one reason to use PHP instead of Ruby is that you will need 100x fewer servers. When you need 100x fewer servers you might also need 100% fewer devops people.

Care to back that up or are you just trolling?

[deleted]

Re: PHP in 2021

#249

Earlier quoted context omitted.

You say > medium quality framework with many flaws Yet you only point out > you can't autocomplete normally with an IDE > You won't see methods that you may call Firstly if there are "many flaws" list them because it seems you only don't like the developer experience with the autocomplete. I noticed no problem with browsing the Laravel API [0] with my short adventure with it. > framework is 10-100 times slower than o…

> 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?

Re: PHP in 2021

#250

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…

"My question is: why would anyone want to start something new with PHP in 2021?" Because that is how people get things done. Example. With Elixir/Phoenix/LiveView I will give you a simple task. Provision a phone number on Twilio. Please see this image: https://imgur.com/a/iACVPvU What would you end up doing? I would bet wasting a ton of time or hacking something up with curl. With PHP/python/ruby I would be done in 1…

https://github.com/postmates/ex_twilio

Probably the code would not be that much different, or at least not more complicated to write.

You would also not use curl anyway with Elixir, it has http clients like other languages you know, for example Httpoison.

Post reply on HN