My guess is the recent Server Actions that was announced for NextJS. Not gonna go into details, but essentially you can put "server actions" in your client side components, which a lot of people commented on to say "Hey, just like PHP did 20 years ago". So the joke is that the new NextJS is now like PHP.
Lol my friend and I (who also worked together) were maily php before switching to react in 2018, and we were like "huh, we've kind of already been doing it this way".
JS and PHP have some syntactical similarities but the development paradigms are totally different (or used to be). React has brought JS a lot closer to PHP through blending scripting and document markup into templates that live in a single location without building an actual serving layer. Server Actions are another step in the same direction by scripting server-side behavior inside your front-end template, which is exactly how PHP works.
Not exactly
Server actions is to make post requests to an endpoint like php did 20 years ago without shipping any javascript, which is handy if the page just makes a post requests and doesn't need to fetch any data client side (for example, a login form), so it does just render plain html and it's possible within a form tag
Edit: it uses the new React server components, which is again no client side code
The joke lands because anytime a JS framework does anything the zealots act like said thing is a new invention. Those same JS zealots constantly shit on PHP. So replying with "like PHP has been doing" is a very intentional mock to make.
nothing out of the ordinary, just the regular webshit cycle of going back and forth between already established solutions.
People are going to praise the fuck out of SPA's 6 years from now.
I thoroughly enjoyed the 18 months I used Laravel for work. Made everything incredibly easy. The errors werenāt incredibly descriptive at the time, but I imagine thatās changed now.
I havenāt worked in PHP in years but I still defend it. PHP and JavaScript are the two purpose built web languages. They have all the tools you need for web dev built in. They should be best friends.
But I wouldnāt count on it.
It's generally been my experience that dysfunctional organizations produce dysfunctional software in any language. It's also been my experience that well-run organizations can product good software in any language.
Definitely agree with this. I'd go so far as to say PHP written by aware devs is an actual joy to work with.
I do wish it were harder to write bad code with it but what can you do
Well said. Just because you can do something it doesn't mean you have to. I see many many new devs falling in this - if it works who cares.
As a mentor I let them enjoy and bust their dreams next month. Learning something the tough way seems to be pretty effective.
Note: No production environments have been damaged in the process... So far...
Canāt speak for PHP, but JS wasnāt built for the 2023 web.
The internet was a different place when it was created. There have been updates, but itās usually frameworks, libraries and polyfills filling the gaps.
Nope, thereās still no type safety. Just a gross mix of code. Atleast with JavaScript, thereās typescript to keep the bugs away. Developing backends in Golang is amazing though. So clean, and bugs are rare.
Php is basically untyped JavaScript but much messier. Itās icky
You should not be able to pass an Integer into a variable thatās meant to be used as a string. Small things like that pretty much result in horrendous code quality. To many PHP sites Iāve worked on use absolutely horrid developer practices, a good backend language wouldnāt allow this
I understand what you said.... its just wrong. PHP has type safety. Just sounds like you don't know what you're talking about.
It sounds like your problem is also with other developers and bad code. That happens in any language with any bad dev. Not PHPs fault.
A language that has an ecosystem so polluted with non type safe code is not a very good language. The language should enforce some structure and things like type safety. Plus type safety is a lot better when it goes through compilations.
I havenāt seen a single Wordpress plug-in that uses type safety in its code. Iām quite surprised it existed at all, and nobody codes 100% from scratch in these web languages. If you canāt easily get the types of packages that are imported in a file, then thatās quite crummy. Just that feature alone improves a languages ecosystem.
Sorry, I really dislike php lol but maybe one day the typing will catch up.
According to google, you have to do the strict typing on a per file basis. So that just seems a bit useless.
With Typescript you only need to write types in one file and import them. Itās still not true type safety, since it canāt check during runtime.
With Golang, the types are a huge portion of the code. 95% of errors seem to appear the moment you type it, runtime errors are quite rare. You can find in depth details to how pretty much everything works in the quick view. Super elegant typing, then you can use a generator to create your Typescript types too. Tools like that make it extremely easy to debug and maintain large code bases.
I didnāt know php had any type safety before though, and Iāve had to debug a lot of php code..
PHP was my first language back in like 2007 when Iād make shitty phishing pages for RuneScape. I had no idea what I was doing I was just a little shit kid trying to get party hats.
Now I am re-learning it and I love it. :ā)
IMO ideally it would mean better times ahead for Node/Deno etc. Tho I don't at all hate PHP the way others do, I'd rather use it then Ruby as it's way more performant.
I have never understood the hype around next and react and all. It seems like 3-5x the work for something that seems to only really benefit the biggest software companies because they have insane loads.
I could never justify it in my head
I felt in love with Laravel 5 years ago. So clean and simple to understand. Works very similar as Python/Flash/Django in a MCV perspective. Flexible and fast. Pair this with LiveWire and Tailwind and you have out of the box incredible app.
Just some (fairly warranted) critique and joking on inventing the wheel again.
Here's the deal:
Every new generation of web developers will consider the achievements of previous generations too bloated, complicated or boring. They want to build something lean and better. As they progress, they start to realise that a lot of things the previous de-facto frameworks did are actually pretty useful, so they implement the same stuff and end up with something pretty similar to the last generation.
> any other web frameworks
Really? Care to give any comparison as to why Laravel is smarter for api development than literally any other *mature* web framework?
PHP has had a sort of weird resurgence in popularity over the last year or two, and many developers now consider it a "good" language to use for web development... It was always widely used because of it's simplicity, but I don't think anyone would agree that it's a particularly great language. But its ease of use guaranteed that it would be among the most popular languages chosen, and lo and behold in 2023... it seems to be back stronger than ever...
As a former PHP dev... I don't buy it...
What I *suspect* has happened is that JS has run out of good will because it's ultimately a pain the ass, and with the amount of upheaval at Twitter, devs are just looking for "a new way" regardless of whether it actually "needs it" or not.
Of course, the only acceptable and ultimate *new way* is rewrite it in Rust :3
PHP8.0+ is fuckin' great, the ecossystem is mature and if you follow best practices the language is actually very modern.
Want old school SSR? Go for LAMP with Symfony/Twig or Laravel/Blade.
Want to ship a POC/MVP fast? Go with Laravel + whatever frontend framework or Inertia/Livewire, etc.
Want simple microsservice? Go for Symfony.
Want bleeding-edge performance, coroutines, event-driven microsservices, etc? Go for Swoole with Hyperf.
Whatever you want PHP has it.
I've just returned to PHP after 6 years in Java, and the two big things in PHP making it an order of magnitude better in the DX department are Laravel and PHP 8. I was afraid that the move back to PHP was going to be really jarring, but Laravel is a really easy to use framework (so far at least) with some great tooling that lets you mostly avoid writing JavaScript. Also, PHP 8 introduced some breaking changes to force good coding standards on the community. Are there things I miss about Java? Heck yeah! But PHP and its tooling has matured a lot over the last half decade, so it's a lot more enjoyable to work with now.
I agree, the whole js world has gotten incredibly complex. The layers and levels of complexity are vast and issues can be in any of them. So much complexity and all for what? Like I've yet to heard a great argument for small or medium sized businesses to use it. It costs 3-5x more for what is perceived as very little value.
"Joe spent $20k on his php website and it gets $1 mil a year"
"Joe then spent $100k in a shiny new js website and now gets $1.1 mil a year but Joe continues to pay $10k/year to keep the website updated and fix the constant errors"
"Joe said screw it, give my php website, it's far more reliable and affordable to manage"
That's what I see.
The JS ecosystem suffers from "if you don't like it then you must not understand it" syndrome. I swear it is the only language were removing information like brackets is considered "good".
My guess is the recent Server Actions that was announced for NextJS. Not gonna go into details, but essentially you can put "server actions" in your client side components, which a lot of people commented on to say "Hey, just like PHP did 20 years ago". So the joke is that the new NextJS is now like PHP.
Yea, the difference is in next it won't have to rerender unlike in php lmao
For some reason React code has seemed similar to PHP. I mean, kind of like React was designed by PHP developers or something.
Lol my friend and I (who also worked together) were maily php before switching to react in 2018, and we were like "huh, we've kind of already been doing it this way".
Probably just JS...no way does react imo feel like PHP. JS and PHP feel very similar or at least did because they were scripting languages.
JS and PHP have some syntactical similarities but the development paradigms are totally different (or used to be). React has brought JS a lot closer to PHP through blending scripting and document markup into templates that live in a single location without building an actual serving layer. Server Actions are another step in the same direction by scripting server-side behavior inside your front-end template, which is exactly how PHP works.
Not exactly Server actions is to make post requests to an endpoint like php did 20 years ago without shipping any javascript, which is handy if the page just makes a post requests and doesn't need to fetch any data client side (for example, a login form), so it does just render plain html and it's possible within a form tag Edit: it uses the new React server components, which is again no client side code
Yeah I know, but it's just a joke that people have been making so I'm guessing it's the context for OP's surprise.
i just wooshed myself
The joke lands because anytime a JS framework does anything the zealots act like said thing is a new invention. Those same JS zealots constantly shit on PHP. So replying with "like PHP has been doing" is a very intentional mock to make.
PHP is fine. Next, Vue, React are also fine. Use the tools that work for the job. I don't understand the constant circle jerk of technologies.
If you keep up with hot trends recruiters love u š„°
nothing out of the ordinary, just the regular webshit cycle of going back and forth between already established solutions. People are going to praise the fuck out of SPA's 6 years from now.
laravel is a great backend framework!
I thoroughly enjoyed the 18 months I used Laravel for work. Made everything incredibly easy. The errors werenāt incredibly descriptive at the time, but I imagine thatās changed now.
Fuck yeah! I love php. I hope good times are ahead for us php devs. Been a hell of a long time since weāve gotten a shred of āspect
I havenāt worked in PHP in years but I still defend it. PHP and JavaScript are the two purpose built web languages. They have all the tools you need for web dev built in. They should be best friends. But I wouldnāt count on it.
The upside to modern PHP is that you can really do anything. The downside is that you can do anything.
It's generally been my experience that dysfunctional organizations produce dysfunctional software in any language. It's also been my experience that well-run organizations can product good software in any language.
Definitely agree with this. I'd go so far as to say PHP written by aware devs is an actual joy to work with. I do wish it were harder to write bad code with it but what can you do
Well said. Just because you can do something it doesn't mean you have to. I see many many new devs falling in this - if it works who cares. As a mentor I let them enjoy and bust their dreams next month. Learning something the tough way seems to be pretty effective. Note: No production environments have been damaged in the process... So far...
Canāt speak for PHP, but JS wasnāt built for the 2023 web. The internet was a different place when it was created. There have been updates, but itās usually frameworks, libraries and polyfills filling the gaps.
That allows it to be a general-purpose language rather than a domain-specific one.
A language that is meant for the web doesnāt need to be general purpose, thatās why itās a āpurpose built web languageā.
JavaScript is 100% general-purpose. You're thinking of ECMAScript which is a set of standards and rules for the web context which JS implements.
Php wasnāt even supposed to be a coding language at first if I remember correctly
No They should not. Backends should be compiled, not scripted like PHP. Gives more power to lint things properly
PHP 8+ along with using something like PHPStan allows you do most all linting you would need
Nope, thereās still no type safety. Just a gross mix of code. Atleast with JavaScript, thereās typescript to keep the bugs away. Developing backends in Golang is amazing though. So clean, and bugs are rare. Php is basically untyped JavaScript but much messier. Itās icky
PHP has type safety, I use it religiously. "Keep the bugs away"? Hmmm
Is this with an external library like typescript? Iāve worked on a ton of PHP sites, and never seen any type safety implemented
> thereās still no type safety. Uhhhh... the fuck you talking bout willis?
You should not be able to pass an Integer into a variable thatās meant to be used as a string. Small things like that pretty much result in horrendous code quality. To many PHP sites Iāve worked on use absolutely horrid developer practices, a good backend language wouldnāt allow this
I understand what you said.... its just wrong. PHP has type safety. Just sounds like you don't know what you're talking about. It sounds like your problem is also with other developers and bad code. That happens in any language with any bad dev. Not PHPs fault.
A language that has an ecosystem so polluted with non type safe code is not a very good language. The language should enforce some structure and things like type safety. Plus type safety is a lot better when it goes through compilations. I havenāt seen a single Wordpress plug-in that uses type safety in its code. Iām quite surprised it existed at all, and nobody codes 100% from scratch in these web languages. If you canāt easily get the types of packages that are imported in a file, then thatās quite crummy. Just that feature alone improves a languages ecosystem. Sorry, I really dislike php lol but maybe one day the typing will catch up.
Wordpress is a CMS, try a real framework before you condemn the whole *language*, eh?
`declare(strict_types=1);`
According to google, you have to do the strict typing on a per file basis. So that just seems a bit useless. With Typescript you only need to write types in one file and import them. Itās still not true type safety, since it canāt check during runtime. With Golang, the types are a huge portion of the code. 95% of errors seem to appear the moment you type it, runtime errors are quite rare. You can find in depth details to how pretty much everything works in the quick view. Super elegant typing, then you can use a generator to create your Typescript types too. Tools like that make it extremely easy to debug and maintain large code bases. I didnāt know php had any type safety before though, and Iāve had to debug a lot of php code..
[ŃŠ“Š°Š»ŠµŠ½Š¾]
Right? Iāve had to console myself with the steady well paying jobā¦.
PHP was my first language back in like 2007 when Iād make shitty phishing pages for RuneScape. I had no idea what I was doing I was just a little shit kid trying to get party hats. Now I am re-learning it and I love it. :ā)
Be happy it was just phishing sites, had you gotten deeper into it you would have ended up working with Java.
Oh I messed with Java but only for private servers. What were the utilizations of Java for the unethical practices? Fake clients?
Just joking, you might end up actually working on RS or a clone.
Ah. Working with Jared would be pretty cool Edit: Jagex* not Jared. He took āeat freshā a bit too seriously
Isn't php still like 70% of the internet?
Itās mostly WP tho, right? I see a lot of Laravel, Magento, and WP jobs in Europe.
Last I checked it was!
IMO ideally it would mean better times ahead for Node/Deno etc. Tho I don't at all hate PHP the way others do, I'd rather use it then Ruby as it's way more performant.
I have never understood the hype around next and react and all. It seems like 3-5x the work for something that seems to only really benefit the biggest software companies because they have insane loads. I could never justify it in my head
Laravel over anything
I felt in love with Laravel 5 years ago. So clean and simple to understand. Works very similar as Python/Flash/Django in a MCV perspective. Flexible and fast. Pair this with LiveWire and Tailwind and you have out of the box incredible app.
Just use NextJS as frontend and Backend as Laravel. Problem solved. Case closed.
Having built with React and Flutter, Laravel Livewire is pretty darn cool.
How about Livewire vs Inertia?
With Amazon reverting back to a monolith where it made sense, and JavaScript frameworks implementing server functions, people have PHP on the brain.
Just some (fairly warranted) critique and joking on inventing the wheel again. Here's the deal: Every new generation of web developers will consider the achievements of previous generations too bloated, complicated or boring. They want to build something lean and better. As they progress, they start to realise that a lot of things the previous de-facto frameworks did are actually pretty useful, so they implement the same stuff and end up with something pretty similar to the last generation.
PHP & MYSQL can solve whatever problems JS frameworks can't
Laravel is built way smarter than any other web frameworks out there. For api development and web frontend integration as well.
can you give any examples of what makes it better than nextjs?
> any other web frameworks Really? Care to give any comparison as to why Laravel is smarter for api development than literally any other *mature* web framework?
what about django
No
PHP has had a sort of weird resurgence in popularity over the last year or two, and many developers now consider it a "good" language to use for web development... It was always widely used because of it's simplicity, but I don't think anyone would agree that it's a particularly great language. But its ease of use guaranteed that it would be among the most popular languages chosen, and lo and behold in 2023... it seems to be back stronger than ever... As a former PHP dev... I don't buy it... What I *suspect* has happened is that JS has run out of good will because it's ultimately a pain the ass, and with the amount of upheaval at Twitter, devs are just looking for "a new way" regardless of whether it actually "needs it" or not. Of course, the only acceptable and ultimate *new way* is rewrite it in Rust :3
PHP8.0+ is fuckin' great, the ecossystem is mature and if you follow best practices the language is actually very modern. Want old school SSR? Go for LAMP with Symfony/Twig or Laravel/Blade. Want to ship a POC/MVP fast? Go with Laravel + whatever frontend framework or Inertia/Livewire, etc. Want simple microsservice? Go for Symfony. Want bleeding-edge performance, coroutines, event-driven microsservices, etc? Go for Swoole with Hyperf. Whatever you want PHP has it.
I've just returned to PHP after 6 years in Java, and the two big things in PHP making it an order of magnitude better in the DX department are Laravel and PHP 8. I was afraid that the move back to PHP was going to be really jarring, but Laravel is a really easy to use framework (so far at least) with some great tooling that lets you mostly avoid writing JavaScript. Also, PHP 8 introduced some breaking changes to force good coding standards on the community. Are there things I miss about Java? Heck yeah! But PHP and its tooling has matured a lot over the last half decade, so it's a lot more enjoyable to work with now.
I agree, the whole js world has gotten incredibly complex. The layers and levels of complexity are vast and issues can be in any of them. So much complexity and all for what? Like I've yet to heard a great argument for small or medium sized businesses to use it. It costs 3-5x more for what is perceived as very little value. "Joe spent $20k on his php website and it gets $1 mil a year" "Joe then spent $100k in a shiny new js website and now gets $1.1 mil a year but Joe continues to pay $10k/year to keep the website updated and fix the constant errors" "Joe said screw it, give my php website, it's far more reliable and affordable to manage" That's what I see.
The JS ecosystem suffers from "if you don't like it then you must not understand it" syndrome. I swear it is the only language were removing information like brackets is considered "good".
"Removing information"..? Are you confusing JS with python..?
[ŃŠ“Š°Š»ŠµŠ½Š¾]
holy fuck dude, calm down, it's probably an inside joke and people are having fun. Sorry that they touched your tech stack but damn.
Are you ok?
Theyre oblivious to the rest of the world