Warning: uasort(): Array was modified by the user comparison function in FacetapiWidget->applySorts()
Register your own function as FacetAPI sort callback. Then select it in the FacetAPI sort order.

http://example.com/admin/config/search/facetapi/search_api%40default_node_index/block/field_animal_type/edit

http://drupalcontrib.org/api/drupal/contributions%21facetapi%21facetapi.api.php/function/hook_facetapi_sort_info/7

NB: You also accidentally collapsed the space between array and $b

function zoo_facetapi_sort_animal(array $a, array$b) {...}

/**
 * Implements hook_facetapi_sort_info
 */  
function zoo_facetapi_sort_info() {
  $sorts = array();

  $sorts['active'] = array(
    'label' =&gt; t('Animal ...'), 
    'callback' =&gt; 'zoo_facetapi_sort_animal', 
    'description' =&gt; t('Sort by whether the animal is ...'), 
    'weight' =&gt; -50,
  );

  return $sorts;
}


function zoo_facetapi_sort_animal(array $a, array $b) {
  ...
}