Live data from Hacker News

PHP in 2022

stitcher.io

101–110 of 318 posts

Re: PHP in 2022

#101
I'm glad the community around modern PHP is thriving, but filler articles like these are getting on my nerves. Reiterating a bunch of content that has already been covered extensively on the web in the past months (and in 10+ previous posts on your own blog), slapping a misleading title on it and filling it up with call-to-action's for your own personal video/newsletter/courses isn't good content. The author had some really good articles in the past, but this reads like fluff just to fill up his blog. Quality over quantity.

Re: PHP in 2022

#102

PHP is my go to language for building simple backends that store data as json in a file and synchronize access using flock(...). There are a ton of cheap hosting providers that support PHP and all you have do to is copy your files over and everything works. I love to focus my energy on building a great frontend with React or Vue.

You have any good simple examples of your backend? Sounds like what I've been attempting to explain to others. How many concurrent requests and what size of data can you run with a setup as described?

Re: PHP in 2022

#103
post #95
post #87

Earlier quoted context omitted.

More funny is how developers keep being unware that ARC is a GC algorithm implementation. Then they tell learning CS theory is not required.

I do know ARC is also a garbage collector, but is there an agreed name for the other GC's? There is a significant difference and performance implications with ARC vs. the other ones, that's what I meant.

You mean being the worse implementation of any GC algorithm, unless it makes use of tracing GC like optimizations, e.g. hazard pointers with deferred collection? Maybe.

Naturally there are agreed names for other GC's, that is what widely acknowledged books in CS like "The Garbage Collection Handbook" [0], or papers like "A unified theory of garbage collection" [1] go about describing.

[0] - https://gchandbook.org/

[1] - https://dl.acm.org/doi/10.1145/1028976.1028982

Re: PHP in 2022

#104

Wow, Php almost catches up with majority of programming languages!

Can't wait for: - Pattern matching in switch statements (done horribly wrong) - If, while, and switch expressions - Inferred type system - Consistent array method argument order - Actually usable higher order functions and reflection Big reminder: Php is a fractal of bad design, and I intensely hated using it at work for many years. The only good thing in Php is Symfony2 framework. https://eev.ee/blog/2012/04/09/php-…

Big reminder: Read beyond decade old articles. This is precisely the tired parroted line people in this post are talking about when they say they don't understand the modern hate.

Re: PHP in 2022

#105
PHP was a pretty cool language back in the days. Bizarre (yet fast) stdlib and ugly syntax, but super quick to write web stuff, supported by every shared hosting.

Nowadays, it seems to mimic Java, while having inferior libraries, I'm not sure what's the advantage.

Re: PHP in 2022

#106

Earlier quoted context omitted.

You can write JavaScript via Typescript, and you now have one of the best and most popular languages there is (including sum types). There are still a lot of warts, but it’s actually a really nice language IMO.

No good backend frameworks comparable to Rails/Laravel/Django in JavaScript though (and I say this as someone who works with JS backends in my day job).

There is AdonisJS, a JS framework inspired by Laravel. I don't know if it has 1:1 feature comparison with Laravel, but for someone who uses Laravel daily like me, it seems nice.

Re: PHP in 2022

#107

I'm glad the community around modern PHP is thriving, but filler articles like these are getting on my nerves. Reiterating a bunch of content that has already been covered extensively on the web in the past months (and in 10+ previous posts on your own blog), slapping a misleading title on it and filling it up with call-to-action's for your own personal video/newsletter/courses isn't good content. The author had some…

You're not wrong, but Brent's articles are just about the cream de la cream for PHP. I'm glad to see him on the HN front page. I've been coding in PHP since 1999, so I've seen the language evolve from not-Perl to what we have today. For maybe two or three years now I've relied on to Brent to bring me up to the newest state of the art without having to parse changelogs and release notes (which I usually get to around March or April, a few months after the yearly December release).

For those of us in the PHP industry, I feel that the most concise way to stay up to date is with Brent's commentary and the Jetbrains PhpStorm blog.

Re: PHP in 2022

#108
post #73
post #40

Earlier quoted context omitted.

> Why would I choose PHP when starting a greenfield project? Because you don't know better. If all you have is a hammer, everything looks like a nail. Ruby + Rails is miles ahead of PHP + Laravel. If you want more static typing (which I currently believe is a good thing) I really like Kotlin (+ KTor or + Javalin). If you are okay without OO and like static typing Haskell + IHP is pretty complete. If you are okay with…

Quoted post unavailable.

Follow-up question: why is there always someone like you, shit-talking someone for an inoffensive post, demanding evidence while also refusing to waste your precious time providing any?

Sorry if the cool kids are making make you feel left out, with their type systems and borrow checkers and monads.

Re: PHP in 2022

#109
post #63
post #17

Earlier quoted context omitted.

Slow change is good for small projects that you want to build once and use for decades without much maintenance.

A language that uses archaic syntax with dollar vars, semicolons, is pretty verbose itself may die before it evolves into something sensible. Not that I believe PHP will die any time soon, but just replying to your "slow is good".

There is no real producticity gain through not having semicolons and somewhat leaner syntax. That was never the bottleneck: ecosystem, libraries are.

Re: PHP in 2022

#110
post #40

Earlier quoted context omitted.

> Why would I choose PHP when starting a greenfield project? Because you don't know better. If all you have is a hammer, everything looks like a nail. Ruby + Rails is miles ahead of PHP + Laravel. If you want more static typing (which I currently believe is a good thing) I really like Kotlin (+ KTor or + Javalin). If you are okay without OO and like static typing Haskell + IHP is pretty complete. If you are okay with…

Ruby + Rails is miles ahead of PHP + Laravel. Wtf are you saying Willis.. but i guess it's a matter of preference, also consider that in PHP you can also use symfony which is my preference, but regardless of everything, you either come here with a list of things that make ruby on rails miles ahead or people is just going to classify your ideas as worthless

The phrase is "what you talkin bout Willis" - I think it's from the American TV show Different Strokes.
Post reply on HN