Live data from Hacker News

PHP in 2021

stitcher.io

81–90 of 309 posts

Re: PHP in 2021

#81
post #72

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…

PHP is often a good business decision because there is no shortage of affordable devs to help manage the code. If you're building a small, low-margin business, it may be the best choice. I hate writing PHP btw.

For lost cost Wordpress stuff sure, but for higher end senior type work I think it's worse than other languages.

While this is obviously location dependent, over the last year or so I've had dozens of calls from recruiters asking me to come work on PHP (mostly Symfony and Laravel) applications, and telling me they just can't find competent senior and lead devs.

Re: PHP in 2021

#82
post #74

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…

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.

That's not really a rebuttal though.

He asked why it's better, not the same as.

Re: PHP in 2021

#83

> Still no support for generics, unfortunately Huh? PHP is a dynamic language, you already have them in principle. Usually you can just have no type and use instanceof, but also requiring the parameter to be an interface does the job in most cases if you need more clarity. Edit: There's also method_exists! Also a whole heap of other tools in the toolbox https://www.php.net/manual/en/ref.classobj.php

Traits!!

Re: PHP in 2021

#84
post #79

Earlier quoted context omitted.

I liked Symfony but becoming a “PHP guy” looks like a terrible career move still. Also not a huge fan of the one data structure being both a dictionary and an array.

What stack do you recommend? Node/JS or GoLang or React, Java?

Those are fine. PHP has just been tainted by its past and low barrier to entry. I hate to say it but my company now just filters out candidates who have PHP as the majority of their experience because the signal to noise ratio is so bad.

Re: PHP in 2021

#85
post #67

Earlier quoted context omitted.

Ironically, Nextcloud is moving to Golang. https://github.com/nextcloud/server/issues/16726

In fact, if you read the discussion, you'll find there are no plans of moving from PHP at all. Nextcloud is not moving to Go.

Oops, you are right, I confused it with ownCloud

Re: PHP in 2021

#86

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…

The things you mentioned in your second paragraph are precisely why. Because there is no shortage of "devs" who took a month-long training course and think they know everything there is to know about PHP, who will get the thing you're paying them to do mostly working in reasonable time. More importantly, they'll accept crap pay to do it.

Re: PHP in 2021

#87
post #29
post #5

In a post called "PHP in 2021" we really can't omit https://bref.sh/ -- it allows running PHP apps on AWS Lambda effortlessly. With all the serverless craze, it's a very important piece of the ecosystem. After writing PHP apps for two decades, I am absolutely stunned how easy it is. Amazon blogged about it at https://aws.amazon.com/blogs/compute/the-serverless-lamp-sta...

For what it's worth, PHP has always been kinda "serverless". You just point the PHP interpreter at a file, and it runs the script contained in the file!

That's how literally anything which is "executable" works. You just point the interpreter (kernel, ld-linux, php, python, ...) at a file, and it runs the file.

Re: PHP in 2021

#88
post #56
post #29

Earlier quoted context omitted.

For what it's worth, PHP has always been kinda "serverless". You just point the PHP interpreter at a file, and it runs the script contained in the file!

+1. PHP can easily host 1000 applications on a single node, while java people would struggle hosting 1000 docker contained spring boot monsters

My sweet summer child...

Re: PHP in 2021

#89

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 liked Symfony but becoming a “PHP guy” looks like a terrible career move still. Also not a huge fan of the one data structure being both a dictionary and an array.

Amen. And it does neither very well. Not to mention that you can get surprising results like if you insert into an "array" out of order then iterate over it, you get the results in insertion order and not index order.

Re: PHP in 2021

#90

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 was recently asked to do a simple order page for a company where I know a guy. It would be a simple page with a few web forms, emailing the order to them. That's all they needed. I chose PHP because:

1. Even though I haven't used it in a while it is super simple to get in to. 2. They did not pay me to learn new stuff. They did not need a fancy web framework. They don't care about code elegance. 3. They already had a web site hosted on server with PHP. 4. Development environment is easy to setup locally (just download a portable PHP dev env and run). Everything is built in. 5. Passing it on to them, it's just a few text files to upload that they can easily modify as needed. Nothing to compile.

In short, it's just the simplest way to do it sometimes (KISS). And not all projects are big enough to justify more complex solutions.

Post reply on HN