Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/clarify dirname/basename docs wrt. locales
For basename(), we declare the behavior regarding invalid characters in the path as being undefined, since that depends on the availability of mblen, and also on the position of the invalid characters prior to PHP 8.0.0[1]. dirname() is actually not local-aware, but relies on an ASCII compatible character encoding regarding the directory separator. On Windows, it is however, dependent on the currently set codepage (although a fallback is still in place to use the Windows ANSI codepage of the operating system[2], if the string is not valid for the current codepage). Again, we declared failure to comply to these assumptions as resulting in undefined behavior. Users should make sure to pass valid strings. [1] <http://git.php.net/?p=php-src.git;a=commitdiff;h=90705d44e3da1d0aa7b8b4fd921ec597391eccb2> [2] <https://github.com/php/php-src/blob/5e015425263c28d40fd49ee386135f02d0e76975/win32/codepage.h#L95-L106>
- Loading branch information