src/text/tokenizer/TextTokenizer.php
public function in($items, $flags = 0)
    {
        $ret = false;

        // sorts the items in descending order according to their length
        usort(
            $items,
            function ($item1, $item2) {
                return strlen($item1) < strlen($item2);
            }
        );

        foreach ($items as $item) {
            if ($this->eq($item, $flags)) {
                $ret = array($item);
                break;
            }
        }

        return $ret;
    }
public function in($items, $flags = 0)
    {
        $ret = false;

        // sorts the items in descending order according to their length
        usort(
            $items,
            function ($item1, $item2) {
                return strlen($item1) < strlen($item2);
            }
        );

        foreach ($items as $item) {
            if ($this->eq($item, $flags)) {
                $ret = array($item);
                break;
            }
        }

        return $ret;
    }
public function in ( $ items , $ flags = 0 ) { $ ret = false ; // sorts the items in descending order according to their length usort ( $ items , function ( $ item1 , $ item2 ) { return strlen ( $ item1 ) < strlen ( $ item2 ) ; } ) ; foreach ( $ items as $ item ) { if ( $ this -> eq ( $ item , $ flags ) ) { $ ret = array ( $ item ) ; break ; } } return $ ret ; }
Is the next token the in a given list?

This function returns false if the next token is not in a given list
or an array with a single string.

@param array   $items An array of strings
@param integer $flags Flags (default is 0)

@return false|array of a single string
Is the next token the in a given list?