code: public function getWords($string, $minLength = null)
      {
          $tokenizer = new Whitespace();
          $words = $tokenizer->tokenize($string);
  
          if (!is_null($minLength)) {
              foreach ($words as $key => $word) {
                  if (strlen($word) <= $minLength) {
                      unset($words[$key]);
                  }
              }
          }
  
          return array_values($words);
      }
docs: Get words in a string.
  
  @param string $string
  @param int    $minLength
  
  @return array