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

Breadcrumb

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

function Preg::split

Parameters

int-mask<PREG_SPLIT_NO_EMPTY|PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_OFFSET_CAPTURE> $flags PREG_SPLIT_NO_EMPTY or PREG_SPLIT_DELIM_CAPTURE:

Return value

list<string>

11 calls to Preg::split()
ArrayRepository::search in vendor/composer/composer/src/Composer/Repository/ArrayRepository.php
@inheritDoc
ComposerRepository::search in vendor/composer/composer/src/Composer/Repository/ComposerRepository.php
@inheritDoc
GitDownloader::cleanChanges in vendor/composer/composer/src/Composer/Downloader/GitDownloader.php
@inheritDoc
GitExcludeFilter::parseGitAttributesLine in vendor/composer/composer/src/Composer/Package/Archiver/GitExcludeFilter.php
Callback parser which finds export-ignore rules in git attribute lines
GitHubDriver::getFundingInfo in vendor/composer/composer/src/Composer/Repository/Vcs/GitHubDriver.php

... See full list

File

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

Class

Preg

Namespace

Composer\Pcre

Code

public static function split(string $pattern, string $subject, int $limit = -1, int $flags = 0) : array {
    if (($flags & PREG_SPLIT_OFFSET_CAPTURE) !== 0) {
        throw new \InvalidArgumentException('PREG_SPLIT_OFFSET_CAPTURE is not supported as it changes the type of $matches, use splitWithOffsets() instead');
    }
    $result = preg_split($pattern, $subject, $limit, $flags);
    if ($result === false) {
        throw PcreException::fromFunction('preg_split', $pattern);
    }
    return $result;
}

API Navigation

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