I find it funny the author choose Symfony as a framework to "shudder" about. Considering the base of Laravel is Symfony. The rest of the article seems to be more about AI code editing and MUX video players then PHP. So I am not really sure what I am supposed to take from this post.
Back in the day we used Symfony at work. I have a vague feeling that some of my coworkers looked down on Laravel. Less dependency injection, more weird magic.
PHP is the new JavaScript?
31–40 of 88 posts
Re: PHP is the new JavaScript?
#32JS has done the impossible: It made me kinda appreciate PHP. I still despise PHP for its many design (it wasn't actually designed, it just happened) failures, but I've yet to see an application running on a single server with PHP, Apache and MariaDB run slower than "modern" JS slop that needs half a cluster to run the dozens of random object DBs and caches JS devs insist on using prematurely where the application tak…
You can get a lot of the way there with static analyzers like Psalm (psalm.dev). Annotate your functions/classes with detailed types in PHPDoc, and it'll verify that your code behaves consistently with those types.
Re: PHP is the new JavaScript?
#33Re: PHP is the new JavaScript?
#34I find it funny the author choose Symfony as a framework to "shudder" about. Considering the base of Laravel is Symfony. The rest of the article seems to be more about AI code editing and MUX video players then PHP. So I am not really sure what I am supposed to take from this post.
Laravel is really not great for some use cases, while with Symfony you have the flexibility of doing the things the way you want. For example, in Laravel you have the dependencies sprinkled all around the app and with Eloquent you kind of need to use active-record. I am not a big fan of Laravel but I think it is a great tool to build websites, not sure about data heavy backends.
Eventually I wrote up a document (I must have spent 20 hours on that thing) showing the pros and cons according to our needs and what each options offered. The gist of it was that Laravel was a nice wrapper over Symfony components at the time (though it did offer more as well, too - it just wasn't the more we needed), and since we were kind of like power users (data heavy backend with tens of thousands of users, rapidly growing), we should go direct to the source and use the Symfony components without any abstraction.
I mean, we shouldn't have been using PHP at all at the time, but what can you do.
Literally no one arguing for Laravel knew it was based around the Symfony components. Once the CTO saw that and heard me out, we didn't actually end up reviewing the Laravel option at all. I was so relieved.
Those were weird times. I'm not sure how much Laravel has changed since then. At the time it was kind of like an easy way to build simple stuff fast, but it didn't strike me as a great tool for our use case. We needed to make the most performant php-based booking system possible, and some basic benchmarking showed that Laravel introduced some incredible performance penalties that didn't make any sense for us.
Sometimes I miss that product. It had massive potential. I still stumble across it while booking stuff. The UI has barely changed. I suspect they haven't made many changes or made much progress since I left 7 years ago. I really wanted to build it into something better.
Long story short: Laravel wasn't the right choice for that kind of application, no one who wanted to use Laravel had any idea about its architecture but argued with me about it for weeks, haha. Write detailed documents to support your case, it works wonders.
Re: PHP is the new JavaScript?
#35Why choose between PHP and JavaScript when you can write code in CASSIS, a language that runs in the syntactical intersection of both languages? For example: if (js()) { /* javascript */ } else { /* PHP */ } https://github.com/tantek/cassis
Re: PHP is the new JavaScript?
#36(I am using the PSR standard interfaces[1], which means I can sub in any number of different libraries for different pieces of infrastructure. Including Laravel's. :D)
Re: PHP is the new JavaScript?
#37PHP 8.x == TypeScript
Re: PHP is the new JavaScript?
#38Why choose between PHP and JavaScript when you can write code in CASSIS, a language that runs in the syntactical intersection of both languages? For example: if (js()) { /* javascript */ } else { /* PHP */ } https://github.com/tantek/cassis
https://tantek.com/cassis.js I don't know what to say, just that I wish I hadn't read this code
Re: PHP is the new JavaScript?
#39Strings are concatenated with the . operator, not +.
Or in older PHP versions it would output a number (because it would cast the strings to 0).
Re: PHP is the new JavaScript?
#40> What happened? Well. Laravel happened (and has been happening). Funny, because Laravel was one of the things driving me away from PHP, in the same way that Rails drove me away from Ruby. PHP was becoming a salvageable language with some of the 7.0 changes, but if you don't dump 1000 pounds of gunk on top to make the easy things hard and there hard things dang near impossible, then you're not a "web artisan", I gues…
But having 30s requests in general should be a red flag into other systems, laravel surely won't take that much to bootstrap.