doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

ksort() behavior changed since PHP 8.2

Open mabar opened this issue 1 year ago • 0 comments

ksort() before PHP 8.2 sorted first string keys, then numeric keys. Since PHP 8.2 it sorts first numeric keys, then string keys.

I think this change should be noted in the ksort documentation and in the changelog.

I have tested these flags:

  • SORT_REGULAR, SORT_ASC, SORT_DESC - behavior changed
  • SORT_NATURAL - behavior is the same

I don't know if any other sorting functions are affected

See https://3v4l.org/T2EDs

mabar avatar Apr 07 '24 19:04 mabar