original_string: private static function _getPrefix($word)
      {
          $questionMarkPosition = strpos($word, '?');
          $astrericPosition     = strpos($word, '*');
  
          if ($questionMarkPosition !== false) {
              if ($astrericPosition !== false) {
                  return substr($word, 0, min($questionMarkPosition, $astrericPosition));
              }
  
              return substr($word, 0, $questionMarkPosition);
          } else if ($astrericPosition !== false) {
              return substr($word, 0, $astrericPosition);
          }
  
          return $word;
      }
code: private static function _getPrefix($word)
      {
          $questionMarkPosition = strpos($word, '?');
          $astrericPosition     = strpos($word, '*');
  
          if ($questionMarkPosition !== false) {
              if ($astrericPosition !== false) {
                  return substr($word, 0, min($questionMarkPosition, $astrericPosition));
              }
  
              return substr($word, 0, $questionMarkPosition);
          } else if ($astrericPosition !== false) {
              return substr($word, 0, $astrericPosition);
          }
  
          return $word;
      }
code_tokens: private static function _getPrefix ( $ word ) { $ questionMarkPosition = strpos ( $ word , '?' ) ; $ astrericPosition = strpos ( $ word , '*' ) ; if ( $ questionMarkPosition !== false ) { if ( $ astrericPosition !== false ) { return substr ( $ word , 0 , min ( $ questionMarkPosition , $ astrericPosition ) ) ; } return substr ( $ word , 0 , $ questionMarkPosition ) ; } else if ( $ astrericPosition !== false ) { return substr ( $ word , 0 , $ astrericPosition ) ; } return $ word ; }
docstring: Get terms prefix
  
  @param  string $word
  @return string
docstring_tokens: Get terms prefix