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

Breadcrumb

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

function Regex::replaceCallbackArray

Parameters

($flags is PREG_OFFSET_CAPTURE ? (array<string, callable(array<int|string, array{string|null, int<-1, max>}>): string>) : array<string, callable(array<int|string, string|null>): string>) $pattern:

string $subject:

int-mask<PREG_UNMATCHED_AS_NULL|PREG_OFFSET_CAPTURE> $flags PREG_OFFSET_CAPTURE is supported, PREG_UNMATCHED_AS_NULL is always set:

File

vendor/composer/pcre/src/Regex.php, line 156

Class

Regex

Namespace

Composer\Pcre

Code

public static function replaceCallbackArray(array $pattern, $subject, int $limit = -1, int $flags = 0) : ReplaceResult {
    $result = Preg::replaceCallbackArray($pattern, $subject, $limit, $count, $flags);
    return new ReplaceResult($count, $result);
}
RSS feed
Powered by Drupal