PHP in 2021
51–60 of 309 posts
Re: PHP in 2021
#52My beef with PHP is not so much the language itself, but the weird community that surrounds it. The FIG standard that forbids TAB for indentation (which is perfectly legal in PHP), the notion that classes should be either abstract or final, the micro-optimizations (thou must use single quotes, things like that). I don't think anyone can tell anyone how to write PHP, because nobody knows how to get it right (myself in…
If you're not writing a framework or library for others to use, nothing the FIG says is necessarily relevant to you.
And in fact, even if you are, Doctrine, Guzzle, Laravel, and Symfony have all left the FIG, so it has even less relevance now.
So...it's a group that used to make standards for a very specific audience, and now mostly doesn't, in part because all of the most important members of that audience got fed up and left.
That's your biggest beef with PHP? Just adopt whatever standards you like.
Re: PHP in 2021
#53I wish there was a nodejs equivalent to Laravel
Re: PHP in 2021
#54In 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...
I don't get it - the cheapest webhosts ($3/month) all let you run PHP - why would I need a cloud function when I have an always-on machine? And if it's for something with high traffic, why would you want a cloud function anyway? I thought they are meant for "runs sporadically, so why have a machine that's always on?" setup.
The landscape is changing too. So if your work is stateless or relatively low bandwidth, and has variable load then it's probably worth trying FAAS.
Re: PHP in 2021
#55PHP 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 (on par with and even in some ways better than Rails) that nobody should be ashamed to use. Never heard of Laravel. Decided to take a look. First thing the intro documentation says to do is install something called 'Docker Desktop'. I'm good, thanks. Why do I need Docker to play around with a web framework?
Because modern web development is complex, and Docker helps make that burden less so.
You make it sound like you took one look at the docs, and that was just too much for you to go any further.
Don’t get into front end development, because you’ll lose your mind.
Re: PHP in 2021
#56In 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!
Re: PHP in 2021
#57In 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...
I don't get it - the cheapest webhosts ($3/month) all let you run PHP - why would I need a cloud function when I have an always-on machine? And if it's for something with high traffic, why would you want a cloud function anyway? I thought they are meant for "runs sporadically, so why have a machine that's always on?" setup.
Is this possible without AWS? Certainly. I was one of the two people who wrote the queue subsystem for Drupal more than a decade ago. And yet, AWS here does away with all the scalability concerns both up and down.
Re: PHP in 2021
#58I know PHP is really great (and always has been). But sh*t, there is soooo much bad, no, really really bad PHP code that lives out there. Isn't it?
Re: PHP in 2021
#59It's nice to see PHP adding useful things like enums and async (green threads). My foray into Web development started with Perl, but quickly segued into PHP with how much simpler it felt. The ability to hop into vim on your server (or use CPanel back in the day) and edit your site live was exciting back then – but now that very thought makes me shudder with what could go wrong, haha. While I've moved onto JVM languag…
Thanks, I saw it :)
Re: PHP in 2021
#60Earlier quoted context omitted.
Unfortunately the documentation does make it look like you need docker to get started. You don’t though. A litter further down in the docs there is a section for using just Composer, if you’re still interested in checking it out: https://laravel.com/docs/8.x#installation-via-composer
What happened to Homestead? That seemed to be the recommended way of starting last I touched PHP professionally (4-5 years ago)