Is it possible to set the order of the displayed elements (Layers) in the legend graphic recieved by WMS
GetLegendGraphicREQUEST or will MAPSERVER always return in the order of layers defined in the map-file?
GetLegendGraphic has a mandatory parameter LAYER which accepts only one layer as a value mapserver.org/ogc/wms_server.html?. So you cannot order the layers because there will always be just one. Sort of an exception is group layer but you cannot sort that either: "If the requested layername is a GROUP-name, all included layers will be returned in the legend-icon."
Also the classes within the layer appear in the legend in the same order than they are defined in the mapfile.
MapServer has also it's own and peculiar legend system http://mapserver.org/output/html_legend.html#html-legend. It probably gives more flexibility but those legends can't be accessed with the WMS GetLegendGraphic request.