Live data from Hacker News

PHP in 2023

stitcher.io

131–140 of 285 posts

Re: PHP in 2023

#131

Earlier quoted context omitted.

I'm rebuilding an old online community / forum in the TALL stack. It's awesome. I do have to do a lot of raw sql query building to keep it performant though.

So do you just not use Laravel’s ORM?

It's possible to combine query builder, orm and raw sql any way you want

Re: PHP in 2023

#132
post #54

[dead]

The only gripe I have with PHP is that the standard library while extensive is a total inconsistent mess. Would rather see that addressed first.

It's unlikely to happen. 10-20 years of use for many of those community generated functions is a lot to break. It may happen eventually, but I wouldn't count on it.

Re: PHP in 2023

#134

I used to work way back in the day on PHP too, but even though I'm sure this will be downvoted, it's really sad people still take it seriously as a language in 2023. There's nothing remotely elegant about it. It's not expressive or programmatically succinct in the way Ruby is. It's not beautifully well thought-out the way Python is. It's not fast and modern in the way Rust is. It's not elegant or composable or client…

I was waiting for a comment like this. If I had a penny for.... I would be a gazillinaire :)

Re: PHP in 2023

#135

Earlier quoted context omitted.

> I used to work way back in the day on PHP too, This is your issue - PHP Modern PHP (with a framework like Laravel or Symfony) is probably one of the most productive ways to build web applications. > It's not beautifully well thought-out the way Python is. This is definitely an interesting take... Python hasn't even solved package management yet. And the 2.7 => 3 migration is probably the most famous example of maki…

I'm on PHP 8 and I feel the same as parent. Sure, there's been a lot of progress since the PHP 5 days, but the core of the language has been left mostly untouched by design, and we haven't seen the kind of drastic moves like JS moving to ES6 syntax. It's a matter of taste, so there's no absolutr truth. I hate PHP's function and property access syntax differenciation and wildly prefer ruby's approach or instance. And…

"Can't find it pleasant" is a personal preference and not why no one should use PHP which the GP is suggesting.

Re: PHP in 2023

#136
post #49

It's been 10 years since "PHP: a fractal of bad design" [1] was written. It's remarkable how the language evolved, and how many of the issues mentioned have been fixed and improved over the last ten years. 1. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

It’s funny because when I think of “fractal of bad design”, Javascript is the first thing that comes to mind. I love Javascript but it makes me ask “why?” a lot.

PHP is kind of the same league, a lot of hate comes because some senior employee told a bunch of juniors after years of working in Wordpress that PHP is a garbage language and you should not touch it. "It's cool to hate PHP!"

PHP can make absolute garbage, and it can make a elegant product. Just like Javascript can. And same with Python and Ruby and what ever else everyone recommends.

It may be a lot harder to make garbage in Rust, but it's possible. PHP has a problem where it gets out of your way, gives you the entire toolbox to build a house. But the problem is which one of the 17 types of hammers do I use to hammer in one of the 104 different types of nails. Where as Ruby, gives you 3 hammers and 4 different nails, and 7 magic nails that appear after you're done hammering.

Re: PHP in 2023

#137

If you are thinking about building a web application, take a look at Laravel. I not a huge PHP user, but Laravel is always on the top of my list for building web applications. It's the greatest web framework to ever exists, even better than Rails IMHO. The ecosystem around Laravel is really incredible and unlike any other framework. They have libraries for every stage of a web application from taking payments all the…

+1 Laravel. Built-in queues is a killer feature that makes your Web App scale with little pain.

Re: PHP in 2023

#138
post #107

Earlier quoted context omitted.

> [Laravel]'s the greatest web framework to ever exists Back when I worked with PHP, we used Symfony and several coworkers very much looked down on Laravel. Symfony was modular and you could easily switch whichever component for your own by just implementing the interface and overriding the dependency injection thing. Word was that Laravel hardcoded many things and was less customisable. What is your take on this? In…

Laravel is great for prototyping and fast building. If you want to make a big application with Laravel, it's better to use Symfony-like approach with interfaces and DI (you can do it by using Laravel). What I personally do not like in Laravel is their ORM, too much magic calls involved.

Yes, the magic involved in Eloquent ORM, also the central use of Facades or that the models are based on migrations (which uses code comments as a crutch for auto-completion), instead of the migrations being based on the models (how Symfony uses simple PHP objects, from which then Doctrine generates the "missing" migrations).

I can live with both frameworks, but Symfony just feels cleaner and more transparent in its workings without using magic to make things look simpler.

Re: PHP in 2023

#139
post #49

It's been 10 years since "PHP: a fractal of bad design" [1] was written. It's remarkable how the language evolved, and how many of the issues mentioned have been fixed and improved over the last ten years. 1. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

It’s funny because when I think of “fractal of bad design”, Javascript is the first thing that comes to mind. I love Javascript but it makes me ask “why?” a lot.

Just use typescript

Re: PHP in 2023

#140
post #49

It's been 10 years since "PHP: a fractal of bad design" [1] was written. It's remarkable how the language evolved, and how many of the issues mentioned have been fixed and improved over the last ten years. 1. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

It’s funny because when I think of “fractal of bad design”, Javascript is the first thing that comes to mind. I love Javascript but it makes me ask “why?” a lot.

Php's inconsistencies in regards to needle vs haystack make me weep. Javascript doesn't have anything remotely like that.
Post reply on HN