I as its fun to write a quick arbitrary sorting.
A simple use is possible to sort the article. If required, it is suitable for processing of large data.
This piece is based on sparse arrays, so it works very quickly.
Link to extention
It just so happened I wrote it originally for Yii 1.1, is now ported to Yii2 and will continue to write.
Thanks for attention