Re: Feature request and RFC

From: Date: Wed, 25 Feb 2015 10:31:58 +0000
Subject: Re: Feature request and RFC
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-83761@lists.php.net to get a copy of this message
2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt <thomas@gielfeldt.dk>: > I have some more proposals for how to implement this interface. Should we > create an RFC for purposes of discussion, or do you usually do this in the > mailing lists? > Best interface is described by the one single method: sort() that accepts optional flags and callback function: So, interface Sortable { const ASC = 1; const DESC = 2; const SORT_REGULAR = 4; const SORT_NUMERIC = 8; // more consts here... public function sort($flags = 0, callable $callback = null); } Callback will accept key and value pair.

« previous php.internals (#83761) next »