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?
PHP 8.1.0
41–50 of 286 posts
Re: PHP 8.1.0
#42I'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
#43I'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…
Re: PHP 8.1.0
#44Re: PHP 8.1.0
#45I'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
#46Earlier quoted context omitted.
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 pro…
Re: PHP 8.1.0
#47I haven't written PHP in years but I get the feeling from this release that they are taking inspiration from TypeScript and JavaScript.
Re: PHP 8.1.0
#48Fibers "allow blocking and non-blocking implementations to share the same API" That's an interesting contrast to Python where the need to use "value = await fn()" v.s. "value = fn()" depending on whether or not that function is awaitable causes all kinds of API design complexity, all the way up to the existence of tools like https://github.com/python-trio/unasync which can code-generate the non-async version of a lib…
But if you are writing framework or library that has to deal with both, its: result = fn() if isawaitable(result): result = await result And turns out isawaitable is not that fast so things like GraphQL libraries that run above logic thousands of times per request get noticeably slow.
I didn't realize it had a significant performance overhead though, I should look into that.
Re: PHP 8.1.0
#49Because it's not possible to instantiate an enum, if one appears in the constructor of a class it'll break auto-wiring. I've written my own IoC containers and one fundamental assumption in them is that when class_exists returns true, it is what it says on the tin. Using a specialized factory would still be possible. I wonder if other containers would break on seeing enums as well, but I hope they fixed this because it's not mentioned in the breaking changes. The documentation for class_exists doesn't mention enum.