Hi Internals,
I have opened a Pull Request to add \f (form feed) to the list of characters stripped by default in trim(), ltrim(), and rtrim().
Currently, the default behavior of trim() strips the following characters: \n, \r, \t, \v, \0, and space. The form feed character \f is notably missing, despite being widely recognized as a whitespace character (in python, rust…).
Although I think this change aligns trim() with standard whitespace definitions, it is technically a backward compatibility break. I am writing to check if there are any strong objections to this change or if it requires further discussion.
References**:**
-
Pull Request: https://github.com/php/php-src/pull/20788
Thanks,
Weilin Du