1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Add stub for preg_match

This commit is contained in:
ralila 2021-11-29 14:21:58 +01:00
parent f1d47cc662
commit d57c246c93

View File

@ -963,6 +963,24 @@ function preg_replace_callback($pattern, $callback, $subject, int $limit = -1, &
*/
function preg_match_all($pattern, $subject, &$matches = [], int $flags = 1, int $offset = 0) {}
/**
* @psalm-pure
* @template TFlags as int-mask<0, 256, 512>
*
* @param string $pattern
* @param string $subject
* @param mixed $matches
* @param TFlags $flags
* @param-out (TFlags is 256 ? array<array-key, array{string, 0|positive-int}|array{'', -1}> :
* TFlags is 512 ? array<array-key, string|null> :
* TFlags is 768 ? array<array-key, array{string, 0|positive-int}|array{null, -1}> :
* array<array-key, string>
* ) $matches
* @return 1|0|false
* @psalm-ignore-falsable-return
*/
function preg_match($pattern, $subject, &$matches = [], int $flags = 0, int $offset = 0) {}
/**
* @psalm-pure
*