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

Breadcrumb

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

function Preg::isMatch

Variant of match() which returns a bool instead of int

@param-out array<int|string, string|null> $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:

151 calls to Preg::isMatch()
ArchiveManager::getPackageFilenameParts in vendor/composer/composer/src/Composer/Package/Archiver/ArchiveManager.php
@internal
ArrayLoader::configureObject in vendor/composer/composer/src/Composer/Package/Loader/ArrayLoader.php
ArrayRepository::search in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php
@inheritDoc
AuthHelper::addAuthenticationHeader in vendor/composer/composer/src/Composer/Util/AuthHelper.php
AutoloadGenerator::dump in vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php

... See full list

File

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

Class

Preg

Namespace

Composer\Pcre

Code

public static function isMatch(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0) : bool {
    return (bool) static::match($pattern, $subject, $matches, $flags, $offset);
}

API Navigation

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