Oh gosh! #PHP's `trim` function isn't as easy as I originally thought..... The d...
Alerta! Alerta! @heiglandreas@phpc.social
Oh gosh! #PHP's `trim` function isn't as easy as I originally thought.....
The documentation at https://www.php.net/trim speaks of "characters". But beware! That's one-byte characters!
So calling `trim($string, '"„“'')` to remove some common quote-characters will internally convert the second parameter to these bytes: `0x22 0Xe2 0x80 0x9e 0xe2 0x80 0x9c`
And they will then be removed from the start or end of a string. No matter whether that's UTF8 or ASCII... 🙈