Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Preg.php

function Preg::matchAllStrictGroups

Variant of `match()` which outputs non-null matches (or throws)

@param-out array<int|string, list<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|positive-int

Throws

UnexpectedNullMatchException

4 calls to Preg::matchAllStrictGroups()
InitCommand::getGitConfig in vendor/composer/composer/src/Composer/Command/InitCommand.php
PhpFileParser::findClasses in vendor/composer/class-map-generator/src/PhpFileParser.php
Extract the classes in the given file
Preg::isMatchAllStrictGroups in vendor/composer/pcre/src/Preg.php
Variant of `isMatchAll()` which outputs non-null matches (or throws)
Regex::matchAllStrictGroups in vendor/composer/pcre/src/Regex.php
Variant of `matchAll()` which returns non-null matches (or throws)

File

vendor/composer/pcre/src/Preg.php, line 112

Class

Preg

Namespace

Composer\Pcre

Code

public static function matchAllStrictGroups(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : int {
    $result = self::matchAll($pattern, $subject, $matchesInternal, $flags, $offset);
    $matches = self::enforceNonNullMatchAll($pattern, $matchesInternal, 'matchAll');
    return $result;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal