function Preg::matchStrictGroups
Variant of `match()` which outputs non-null matches (or throws)
@param-out array<int|string, string> $matches
Parameters
non-empty-string $pattern:
array<mixed> $matches Set by method:
int-mask<PREG_UNMATCHED_AS_NULL> $flags PREG_UNMATCHED_AS_NULL is always set, no other flags are supported:
Return value
0|1
Throws
2 calls to Preg::matchStrictGroups()
- Preg::isMatchStrictGroups in vendor/
composer/ pcre/ src/ Preg.php - Variant of `isMatch()` which outputs non-null matches (or throws)
- Regex::matchStrictGroups in vendor/
composer/ pcre/ src/ Regex.php - Variant of `match()` which returns non-null matches (or throws)
File
-
vendor/
composer/ pcre/ src/ Preg.php, line 52
Class
Namespace
Composer\PcreCode
public static function matchStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int {
$result = self::match($pattern, $subject, $matchesInternal, $flags, $offset);
$matches = self::enforceNonNullMatches($pattern, $matchesInternal, 'match');
return $result;
}