original_string: public static function sort(array $records, array $fields) {
          $records = new coursecat_sortable_records($records);
          $records->sortfields = $fields;
          $records->uasort(array($records, 'sort_by_many_fields'));
          return $records->getArrayCopy();
      }
code: public static function sort(array $records, array $fields) {
          $records = new coursecat_sortable_records($records);
          $records->sortfields = $fields;
          $records->uasort(array($records, 'sort_by_many_fields'));
          return $records->getArrayCopy();
      }
code_tokens: public static function sort ( array $ records , array $ fields ) { $ records = new coursecat_sortable_records ( $ records ) ; $ records -> sortfields = $ fields ; $ records -> uasort ( array ( $ records , 'sort_by_many_fields' ) ) ; return $ records -> getArrayCopy ( ) ; }
docstring: Sorts this array using the given fields.
  
  @param array $records
  @param array $fields
  @return array
docstring_tokens: Sorts this array using the given fields .