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. sebste+8c[view] [source] 2022-12-08 13:47:28
>>user39+j7
There's less and less wrong with it as we go along, but seriously there's still so much crap... You could list so many other than preg_match

>sleep(int $seconds)

>returns zero on success.

>If the call was interrupted by a signal, sleep() returns a non-zero value. On Windows, this value will always be 192. On other platforms, the return value will be the number of seconds left to sleep.

I've used it for 2 years 2 years ago and I'm not at all interested in starting a project with it again

◧◩◪
3. donatj+df[view] [source] 2022-12-08 14:13:23
>>sebste+8c
A little weird, but it was documented.

PHP is nothing if not amazingly well documented. This is more than I can say for a lot of languages I have worked in cough Ruby cough. I work pretty heavily in Go these days and even it’s docs leave me wanting in comparison sometimes.

◧◩◪◨
4. sebste+pl[view] [source] 2022-12-08 14:50:53
>>donatj+df
If documenting was enough band saws would still just have warnings about fingers in their manuals instead of guard rails. "Weird functions" need to have big yellow warnings at the top of their doc with a link to fixed versions of the func
[go to top]