original_string: public function last(callable $fn = null, $default = null)
      {
          if (is_null($fn)) {
              return count($this->items) > 0 ? end($this->items) : $default;
          }
  
          foreach (array_reverse($this->items) as $value) {
              if (call_user_func($fn, $value)) {
                  return $value;
              }
          }
  
          return $default;
      }
code: public function last(callable $fn = null, $default = null)
      {
          if (is_null($fn)) {
              return count($this->items) > 0 ? end($this->items) : $default;
          }
  
          foreach (array_reverse($this->items) as $value) {
              if (call_user_func($fn, $value)) {
                  return $value;
              }
          }
  
          return $default;
      }
code_tokens: public function last ( callable $ fn = null , $ default = null ) { if ( is_null ( $ fn ) ) { return count ( $ this -> items ) > 0 ? end ( $ this -> items ) : $ default ; } foreach ( array_reverse ( $ this -> items ) as $ value ) { if ( call_user_func ( $ fn , $ value ) ) { return $ value ; } } return $ default ; }
docstring: Receive the last element that matches the optional callback
  
  @param callable|null $fn
  @param mixed|null    $default
  
  @return mixed|null
docstring_tokens: Receive the last element that matches the optional callback