2015-02-24 17:17 GMT+01:00 Thomas Gielfeldt <tho...@gielfeldt.dk>: > Hi internals. > > I've made PR proposing a feature request: A new interface Sortable. > > https://github.com/php/php-src/pull/1116 > > If possible, I would like to create and RFC describing this in more > detail, and perhaps get a voting on. > > Thanks > > Br, > > Thomas Gielfeldt > > The 2nd PR I made addresses this (https://github.com/php/php-src/pull/1123), exposing 3 much simpler interfaces depending on what the user wants/needs to implement, which combined covers all the 11 sort functions.
Also, the point of this/these interface(s) is to provide the same power that some of the other SPL interfaces have (Countable, Serializable, ArrayAccess, Iterator, etc.). That is, using native functions with objects possessing certain capabilities.