I 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?
Sure, but you can say as bad or worse about almost all code in the wild. Almost everything is garbage.
PHP in 2021
21–30 of 309 posts
Re: PHP in 2021
#22My 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…
Re: PHP in 2021
#23It'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…
PHP already had curl_multi_perform which is very useful for running child tasks, but I'm not sure you need much more than that.
Re: PHP in 2021
#24My 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…
Re: PHP in 2021
#25I 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
#26My 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…
The PSR's also reflect this tendency. They're a mix of extremely useful standardization (e.g. PSR-4) and hardcode nitpicking about whitespace (e.g. PSR-12). Take what you need, focus on maintainability and interoperability, and ignore the noise.
Re: PHP in 2021
#27It'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…
What do they want async for? PHP's purpose is to run once to generate one HTTP response - they'd already forgotten this by inventing frameworks, but adding async seems to especially have forgotten this. PHP already had curl_multi_perform which is very useful for running child tasks, but I'm not sure you need much more than that.
Re: PHP in 2021
#28My 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 or your team don't care about that and want to do something different, there's nothing stopping you. Even the Symfony team, who contributed to these standards and largely follow them, have gone their own way when they thought it was worth the trade-off.
Re: PHP in 2021
#29In 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...
Re: PHP in 2021
#30PHP 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.
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?