Kudos to the folks who built Castopod.
Kudos to the folks who built Castopod.
Now that file-based routing is making a comeback (https://enhance.dev), it would be interesting (and hilarious) to see it come full circle and we all go back to writing SSR with PHP.
Hello. I'm someone that never stopped.
Been paying my bills with PHP for fifteen years, and as PHP has gotten better and better I haven't regretted a minute of it.
For Node/JS folks, we've had "PSX" for decades in PHP:
<?php
function render($html) {
return <<< PSXRULEZ
Look ma, it's pure $html!
PSXRULEZ;I'd say the issue isn't PHP (8.1 is actually packing a ton of awesome features), but more so old PHP programming practices that are still very prevalent.
[1] https://martinfowler.com/eaaCatalog/transactionScript.html
As to how we're sorting that; pretty much the only major project I can think of that I'd describe as "actively legacy" in its codebase/style is WordPress, and that's a hairy discussion around moving forward vs. backwards compatibility of their plugin/theme ecosystem which is their primary USP.
Practically every other serious project has moved to the composer/PSR-4 autoloading model, and a lot of them also make use of static analysis/linting tools to squash potential bugs and enforce standards.
If you're a web dev company that values maintainable code you can weed out these legacy slapdashers in recruiting.
And those legacy projects out in the wild? Not my concern until someone brings one to us saying they want x feature added, we point out the Y,Z and Q faults / security issues with their slapdash code, and negotiate a price on a sane rebuild that'll be maintainable going forward.
It may be a bit of mess, but it's being made better little by little each day, and the naysayers can complain about PHP all they want, I'm still getting paid to write PHP.
You can probably in general estimate the expected lifetime of a language to be at twice as long as it has currently existed.
https://code.castopod.org/adaures/castopod/-/blob/develop/co...
Now seeing Laravel rebuilding the entire PHP ecosystem with a highly collaborative community, standard practices and tools is amazing!
Too bad I'm not investing in web dev anymore.
Also likewise to the team, kudos to the people who built Castopod
Not specific to 7, but 2 things I think have helped a lot are:
* PSR standards * composer packaging
Initial PSR work helped define some package interop standards. I'm not sure how useful ongoing PSR work today is (no doubt there's some incremental benefits?).
Composer is a great package manager, and helped usher in a lot more sharing/reusability of common components.
Laravel bundles a number of Symfony components, for example (many frameworks do).
The speed alone in 7 was big, and we've seen some more incremental improvments in 8 and 8.1 and 8.2. It's hard to find current benchmarking tools that compare the 5 series with 7 and 8. I found one showing 5->7 on a mandelbrot run.
* PHP 5.0 was 251s
* PHP 5.1 was 87s
* PHP 5.6 was 29s
* PHP 7.0 was 15s
* PHP 7.1 was 9s
The 'experimental JIT' work (at that time) yielded 4s.
That benchmark was from 2016, so... way out of date now, but other numbers I've seen were 7.1->7.4 was another ... 10% improvement on average, and depending on workload, you might see another 10-20% improvement from 7.4->8.0.
Kinsta has some interesting useful benchmarks on 'real world' apps
https://kinsta.com/blog/php-benchmarks
Been using PHP since 1996, and ecosystem, community, performance all continuously improve year over year.
On Linux, production multi-PHP deployment is dead-simple thanks to the excellent DEB.SURY.ORG (for DEB based distros) and REMI (for RPM based distros) repos. It's also more common to deploy PHP via PHP-FPM and Nginx nowadays. Homebrew does a decent job on macOS too, multi-PHP deployment is also easy when coupled with Nginx/PHP-FPM. For Windows I have no idea but as long as you got XAMPP and MAMP, well :) Lots of Docker based solutions too like LocalWP (not just for WP), Lando, Laragon, DDEV to name a few.
There's also excellent support in editors/IDEs, either by default (in JetBrain's PHPStorm, Nova, KDevelop or Kate Editor) or via plugins for VSCode, Sublime Text, Atom and others.
That’s not to say you can’t build great things on Laravel, and it’s undeniably sparking lots of creativity - I just wish the better competitor had won. Betamax all over again.
Lately though, I am beginning to get annoyed with Laravel due to way too many breaking changes with major releases literally within months and definitely a bit exhausted trying to keep up. I understand they are going full scale modernized approach but after Laravel 6, it has been too many major releases.
I personally love Symfony even though it was a lot easier to start and go to market with Laravel.