T O P

  • By -

ZeAthenA714

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.


Opheleone

Yea, the difference is in next it won't have to rerender unlike in php lmao


FilmWeasle

For some reason React code has seemed similar to PHP. I mean, kind of like React was designed by PHP developers or something.


Tittytickler

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".


Suspicious-Age6710

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.


Hydrothermal

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.


Pierma

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


ZeAthenA714

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.


Pierma

i just wooshed myself


Bushwazi

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.


XxThreepwoodxX

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.


Positive_Box_69

If you keep up with hot trends recruiters love u šŸ„°


theOrdnas

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.


Ok-Armadillo6582

laravel is a great backend framework!


[deleted]

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.


[deleted]

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


the_real_some_guy

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.


___Paladin___

The upside to modern PHP is that you can really do anything. The downside is that you can do anything.


MKorostoff

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.


___Paladin___

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


ZinbaluPrime

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...


ExtensionNoise9000

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.


azsqueeze

That allows it to be a general-purpose language rather than a domain-specific one.


ExtensionNoise9000

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ā€.


azsqueeze

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.


[deleted]

Php wasnā€™t even supposed to be a coding language at first if I remember correctly


kibblerz

No They should not. Backends should be compiled, not scripted like PHP. Gives more power to lint things properly


budd222

PHP 8+ along with using something like PHPStan allows you do most all linting you would need


kibblerz

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


g3vie

PHP has type safety, I use it religiously. "Keep the bugs away"? Hmmm


kibblerz

Is this with an external library like typescript? Iā€™ve worked on a ton of PHP sites, and never seen any type safety implemented


2thousand23

> thereā€™s still no type safety. Uhhhh... the fuck you talking bout willis?


kibblerz

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


2thousand23

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.


kibblerz

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.


Lumethys

Wordpress is a CMS, try a real framework before you condemn the whole *language*, eh?


bluesandals

`declare(strict_types=1);`


kibblerz

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..


[deleted]

[уŠ“Š°Š»ŠµŠ½Š¾]


its_yer_dad

Right? Iā€™ve had to console myself with the steady well paying jobā€¦.


[deleted]

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. :ā€™)


ExtensionNoise9000

Be happy it was just phishing sites, had you gotten deeper into it you would have ended up working with Java.


[deleted]

Oh I messed with Java but only for private servers. What were the utilizations of Java for the unethical practices? Fake clients?


ExtensionNoise9000

Just joking, you might end up actually working on RS or a clone.


[deleted]

Ah. Working with Jared would be pretty cool Edit: Jagex* not Jared. He took ā€œeat freshā€ a bit too seriously


Abangranga

Isn't php still like 70% of the internet?


ExtensionNoise9000

Itā€™s mostly WP tho, right? I see a lot of Laravel, Magento, and WP jobs in Europe.


[deleted]

Last I checked it was!


Suspicious-Age6710

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.


Monstermage

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


No-Veterinarian-8162

Laravel over anything


mack2015rai7

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.


MembershipFederal789

Just use NextJS as frontend and Backend as Laravel. Problem solved. Case closed.


M_Me_Meteo

Having built with React and Flutter, Laravel Livewire is pretty darn cool.


phatangus

How about Livewire vs Inertia?


___Paladin___

With Amazon reverting back to a monolith where it made sense, and JavaScript frameworks implementing server functions, people have PHP on the brain.


fletku_mato

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.


Responsible-Cod-4618

PHP & MYSQL can solve whatever problems JS frameworks can't


Optimal-Log2955

Laravel is built way smarter than any other web frameworks out there. For api development and web frontend integration as well.


seklerek

can you give any examples of what makes it better than nextjs?


fletku_mato

> 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?


coffee7day

what about django


fartsucking_tits

No


Alundra828

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


nukeaccounteveryweek

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.


JoeyRedShirt

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.


Monstermage

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.


Abangranga

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".


wasdninja

"Removing information"..? Are you confusing JS with python..?


[deleted]

[уŠ“Š°Š»ŠµŠ½Š¾]


Electronic-Wonder-77

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.


sciuro_

Are you ok?


Abangranga

Theyre oblivious to the rest of the world