function Parser::preg_match
A local wrapper for "preg_match" which will throw a ParseException if there is an internal error in the PCRE engine.
This avoids us needing to check for "false" every time PCRE is used in the YAML engine
@internal
Throws
ParseException on a PCRE internal error
11 calls to Parser::preg_match()
- Inline::dump in vendor/
symfony/ yaml/ Inline.php - Dumps a given PHP variable to a YAML string.
- Inline::evaluateBinaryScalar in vendor/
symfony/ yaml/ Inline.php - Inline::evaluateScalar in vendor/
symfony/ yaml/ Inline.php - Evaluates scalars and replaces magic values.
- Inline::parseMapping in vendor/
symfony/ yaml/ Inline.php - Parses a YAML mapping.
- Inline::parseQuotedScalar in vendor/
symfony/ yaml/ Inline.php - Parses a YAML quoted scalar.
File
-
vendor/
symfony/ yaml/ Parser.php, line 1053
Class
- Parser
- Parser parses YAML strings to convert them to PHP arrays.
Namespace
Symfony\Component\YamlCode
public static function preg_match(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int {
if (false === ($ret = preg_match($pattern, $subject, $matches, $flags, $offset))) {
throw new ParseException(preg_last_error_msg());
}
return $ret;
}