(PECL parle >= 0.7.0)
Parle\RParser::validate — Validate input
public Parle\RParser::validate(string $data, Parle\RLexer $lexer): bool
Validate an input string. The string is parsed internally, thus this method is useful for the quick input validation.
dataString to be validated.
lexerA lexer object containing the lexing rules prepared for the particular grammar.
Returns bool whitnessing whether the input chimes or not with the defined rules.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/parle-rparser.validate.php