Live data from Hacker News

PHP 8.1.0

php.net

31–40 of 286 posts

Re: PHP 8.1.0

#31
post #18

Everyone laughing at PHP hasn't tried it for years, I'd bet. It started clumsy, true, but it became a solid and quite elegant way of doing things. And by things I don't mean just web development. The current limitations I see in PHP is that there is not an official multi-core coroutines solution.

I've used PHP recently to work on Phabricator, and the whole "yes it sucked but now it's good" narrative did not match my experience at all. Sure it might have added modern features but the core is still rotten. The alternative would have to be TCL levels of bad to make me choose PHP.

PHP at its core is the best part. A whole bunch of optimized and well tested C functions that are typical of backend functionality.

If you can do as little as possible in PHP and rely on the low level functions to stitch together what you need, deserialize and render data in the front end, use front-end templating, then PHP is insanely fast, practical language.

The issues with PHP are usually when people build out giant frameworks in PHP, rather than using PHP as a higher level glue language for the built-in fast C functions.

Re: PHP 8.1.0

#32
post #18

Everyone laughing at PHP hasn't tried it for years, I'd bet. It started clumsy, true, but it became a solid and quite elegant way of doing things. And by things I don't mean just web development. The current limitations I see in PHP is that there is not an official multi-core coroutines solution.

Elegant is not the word I'd use to describe PHP. Solid, perhaps. Undoubtedly useful. But if there is elegant PHP, I haven't seen it.

Re: PHP 8.1.0

#33
post #19

Who is still using PHP anno 2021?

Considering just WordPress powers something like 40% of the whole www, I'd say quite a few people!

But how much of that is just fake SEO websites? Virtually all the fake sites use Wordpress.

Re: PHP 8.1.0

#34

Earlier quoted context omitted.

It's actually becoming a problem keeping pace with PHP major updates

PHP isn't Linux with its strict "never break userspace" dogma - but for real, a PHP version upgrade should not be that bad to follow.

I think 8.0 had a bunch of relatively major/annoying breaking changes, but that's the first time since the 5.x era.

Re: PHP 8.1.0

#35

I've been using PHP since 5.x. Often had to work on older 4.x web apps. I find it interesting when I read people saying "PHP has come a long way. It's a proper language now, etc." If you work long enough with a language and figure out most its quirks, it's a breeze. It's nice that they are adding all these new features, but they are hardly what makes it or break it for me. Here is the one features that is taken for g…

What monsterous golang app are you running that takes 30 seconds to compile?

Re: PHP 8.1.0

#37

Earlier quoted context omitted.

I've used PHP recently to work on Phabricator, and the whole "yes it sucked but now it's good" narrative did not match my experience at all. Sure it might have added modern features but the core is still rotten. The alternative would have to be TCL levels of bad to make me choose PHP.

PHP at its core is the best part. A whole bunch of optimized and well tested C functions that are typical of backend functionality. If you can do as little as possible in PHP and rely on the low level functions to stitch together what you need, deserialize and render data in the front end, use front-end templating, then PHP is insanely fast, practical language. The issues with PHP are usually when people build out gi…

I've worked on _many_ PHP projects. Unless it's a small single-purpose script, if you tell me it doesn't use one of the standard frameworks, I'm going to assume it's an absolute unholy mess of spaghetti.

Laravel and Symfony are both extremely good, and the only reason people don't use them tends to be out of misplaced arrogance. Unsurprisingly, they end up building their own awful framework, and at some point the project either dies or someone says "Erm, we should put this in Laravel".

There are some people who've built great projects without these frameworks, and there are many projects in these frameworks that are terrible. But in terms of probabilities, you've got a much better chance of a project being well-built if it's in Symfony or Laravel.

Re: PHP 8.1.0

#38

I've been using PHP since 5.x. Often had to work on older 4.x web apps. I find it interesting when I read people saying "PHP has come a long way. It's a proper language now, etc." If you work long enough with a language and figure out most its quirks, it's a breeze. It's nice that they are adding all these new features, but they are hardly what makes it or break it for me. Here is the one features that is taken for g…

Is oopsing 50 times per minute a good thing?

Re: PHP 8.1.0

#39
post #24

Earlier quoted context omitted.

I've used PHP recently to work on Phabricator, and the whole "yes it sucked but now it's good" narrative did not match my experience at all. Sure it might have added modern features but the core is still rotten. The alternative would have to be TCL levels of bad to make me choose PHP.

Phabricator is not written in "modern PHP", so your experience is not surprising

Can you link something written in modern PHP?

Re: PHP 8.1.0

#40

Earlier quoted context omitted.

PHP isn't Linux with its strict "never break userspace" dogma - but for real, a PHP version upgrade should not be that bad to follow.

I think 8.0 had a bunch of relatively major/annoying breaking changes, but that's the first time since the 5.x era.

They did give deprecation warnings in various version 7 releases, so they didn't come out of nowhere. (Not that you said they did, but for the purpose of other readers.)
Post reply on HN