public static function isWord($word)
    {
        if (!is_string($word)) {
            return false;
        }
        return (bool) preg_match(self::WORD_FILTER, $word);
    }
public static function isWord($word)
    {
        if (!is_string($word)) {
            return false;
        }
        return (bool) preg_match(self::WORD_FILTER, $word);
    }
public static function isWord ( $ word ) { if ( ! is_string ( $ word ) ) { return false ; } return ( bool ) preg_match ( self :: WORD_FILTER , $ word ) ; }
Filters non-words out.

Only texts that passed this filtering step
are considered as propositions for the game.

\param string $word
A possible "word" to test.

\retval bool
TRUE if the given $word really is a word,
FALSE otherwise.

\note
This method uses a rather broad definition
of what is a word. In particular, it accepts
sequences of (alphanumeric and other) characters
separated by a single space (eg. "Fo'o. B4-r_").
Filters non - words out .