How to rearrange views PHP sorting criteria?
You can go for hook_views_query_alter.


  Alter the query before executing the query.


function module_name_views_query_alter(&amp;$view, &amp;$query) {
  if ($view-&gt;name == 'Viewname') {
    //dpm($view-&gt;query-&gt;orderby[0]);
   // put your modified sorting criteria
  }
}