> > And then there is *array_multisort* a function which has a signature which > isn't even possible in userland code. > (https://secure.php.net/manual/en/function.array-multisort.php > <https://secure.php.net/manual/en/function.array-multisort.php>). > Other than the fact that this function's documentation isn't totally > correct in my opinion I did a Github search to see if people use it. > From what I've seen in the search results [1], around 620k, it is only used > in phpt unit tests and a unit test of a parser. > > [1] > https://github.com/search?l=PHP&o=desc&p=1&q=array_multisort&s=&type=Code > <https://github.com/search?l=PHP&o=desc&p=1&q=array_multisort&s=&type=Code> >
Presumably, if you sort the results by ”Best match”, test units appear first because they are the only occasions where you invoke this function ten times in a row. Try to sort by ”Recently indexed” and you’ll get some real usages. > Now, I don't think a function which doesn't follow normal function > signature converntion (or isn't even possible) shouldn't really be part of > the language. > Moreso that it seems barely anybody uses it. > What's people opinion on deprecating array_multisort ? One of the most important things to consider when proposing deprecations is the migration cost you impose to your users. It is apparently something easily forgotten by those that love deprecations : “In order to make migrating your legacy code even more painful, we have carefully chosen to deprecate a function that you’ll have trouble to reimplement userland.” Moreover, even when assuming (incorrectly) that it is barely used: What is the benefit of deprecating array_multisort? (This question is valid also for future deprecation proposals.) —Claude