upvote
The php convention is that strings are bytes, but we store utf8 in them. Convert or validate at ingestion, transform using the mb_* family of functions, and be happy.
reply
I have heard this exact answer for decades. The mb_slop_uppercase() is not, and should not be acceptable for any modern language.
reply
It's a big world out there, it's not like you don't have a choice. I quite like the model.

Perl was famous for excellent native unicode support in its native string type, but the result was that you had to keep track of whether your variable was native unicode or octets, and many CPAN modules would try to transparently support both, in buggy ways. A richer system is not always an advantage.

reply
The idea of UTF-16 strings in PHP 6 were a mistake. UTF-8 works in PHP just fine. New languages (e.g. Rust, Go, Swift) stick to UTF-8. UTF-16 is legacy that would be nice to get rid of where it's used (Java, C#, JS, WinAPI), but that is impossible because of backwards compatibility.
reply
Hindsight is 20/20, it's easy now to say that if Unicode had been utf8 from the start, no 16-bit encoding would have been needed anywhere. But someone had to think of it first, and in the real world, 16-bit came first and became quite entrenched.
reply
PHP6 was such a huge lol overall. The core devs seem so far gone its crazy. I see the odd php apologist every now and then, but luckily PHP use has been on the decline for the last decade and a half.
reply
Obviously PHP 6 was a huge “lol”, they abandoned the version number completely. I didn’t start working with PHP until v7 so I missed all of that, but what does any of that have to do with v8.6? Seems like you just want to resurrect ancient buried arguments nobody is worried about anymore.
reply