[20:54:11] TIL that sort() not only sorts by value and ignores the keys, but in fact actively strips the keys like array_values() would, and all that by reference, of course. https://3v4l.org/vVECj [20:54:55] \cc ori - I thought I had spotted a bug in your patch with it ignoring the keys, so that e.g. action=edit&title=Foo and action=Foo&title=edit would be considered equal, but I see that we don't split or decode beyond the key-value pairs as-is. [21:04:59] Krinkle: yes, correct. The code in MediaWiki doesn't rewrite the request. The vmod does. [21:07:17] The vmod maintains the relative order of duplicate parameters and parameters that use PHP array syntax [21:14:28] ori: ack, but if your MW code had also done split '=' and then use sort() on the associative array or something, then it would have considered x=1&y=2 as identical to a=2&b=1 e.g. same strlen() and $params equal after sorting which strips keys. [21:14:37] it's certainly surprising but doesn't affect your code.