Repository navigation
Conversation
There was a problem hiding this comment.
This looks fine. Should we credit the author of #24559 in NEWS cuz you submit identical and correct fixes in a very close time...
|
I am not against that |
…uses locale Co-authored-by: Jon Surrell <sirreal@users.noreply.github.com>
e83c07e to
55cfd71
Compare
|
Added Jon to NEWS and as co-author on the commit, and rebased onto PHP-8.4 while I was at it. Thanks for the report and the nice write-up! |
ndossche
left a comment
There was a problem hiding this comment.
Okay. I'm not sure this can go into 8.4 due to the behaviour change, but it's clearly a bug anyway... cc @php/release-managers-84
|
Sorry for the late response. It's annoying because the manual doesn't specify case folding for the functions, the UPGRADING notes don't cover that change for them either, and the RFC assumed they already worked like this. My feeling out of consistency and the spirit of said RFC is that this makes sense as a bugfix and that these functions need the same change. There should probably be some clarification about this in the manual or something if so. |
PHP 8.2 made case-insensitive comparisons ASCII-only, but the key comparison behind
ksort()/krsort()withSORT_STRING | SORT_FLAG_CASEandsubstr_compare()with$case_insensitive = truestill called the_lvariants, which go throughtolower()and followLC_CTYPE. They now usezend_binary_strcasecmp()andzend_binary_strncasecmp(), same assort()andstrncasecmp().Fixes #24552