zlacker

[return to "PHP 8.2"]
1. user39+j7[view] [source] 2022-12-08 13:16:18
>>TimWol+(OP)
The worst part about PHP is constantly hearing from its detractors, who are often people who haven’t used the language in many years. Haystack needle order, $, fractal of bad design, it just gets old.

The language isn’t perfect but I love working with it, these 8.1 and 8.2 improvements have really made it sweet.

My biggest gripe at the moment is the (very old) behavior of e.g. preg_match() and sort(). You’ve got a small handful of these common functions that operate on their input by reference/in place which is gross. A new version of these would be welcome.

◧◩
2. nathel+ja[view] [source] 2022-12-08 13:38:17
>>user39+j7
Is there still a php.ini that allows you to alter the language’s semantics? To me, that’s the biggest can of worms that PHP used to have. I haven’t touched it in years, so am not up to date.
◧◩◪
3. nolok+oc[view] [source] 2022-12-08 13:48:53
>>nathel+ja
Not really. You have a php.ini that can configure some behavior, but most of what was horrible is either deprecated or straight up removed (register globals, ...)
◧◩◪◨
4. lazka+1m[view] [source] 2022-12-08 14:55:01
>>nolok+oc
assert() is still broken if it's disabled in php.ini.
◧◩◪◨⬒
5. hakre+jF6[view] [source] 2022-12-10 14:07:27
>>lazka+1m
> assert() is still broken if it's disabled in php.ini.

Care to explain what you mean it's broken if disabled? That it is disabled (noop in runtime) so you're missing it? AFAIK that's the production setting. You should be able to enable it in build/test/ci/development, just how you want it.

◧◩◪◨⬒⬓
6. lazka+L08[view] [source] 2022-12-10 22:52:30
>>hakre+jF6
Sure. (1) it is a global setting so I can't decide if I want it on a per application basis, with Docker that is less of an issue though (2) it is disabled by default, so hardly anyone uses it from what I see (3) I'd like to have it always enabled, also in production, so my code doesn't end up in states that I didn't expect and I get notified.

But that might just be me and/or my particular use case.

[go to top]