xref: /PHP-8.4/ext/pcre/php_pcre.stub.php (revision 631bc816)
1<?php
2
3/** @generate-class-entries */
4
5/**
6 * @var int
7 * @cvalue PREG_PATTERN_ORDER
8 */
9const PREG_PATTERN_ORDER = UNKNOWN;
10/**
11 * @var int
12 * @cvalue PREG_SET_ORDER
13 */
14const PREG_SET_ORDER = UNKNOWN;
15/**
16 * @var int
17 * @cvalue PREG_OFFSET_CAPTURE
18 */
19const PREG_OFFSET_CAPTURE = UNKNOWN;
20/**
21 * @var int
22 * @cvalue PREG_UNMATCHED_AS_NULL
23 */
24const PREG_UNMATCHED_AS_NULL = UNKNOWN;
25/**
26 * @var int
27 * @cvalue PREG_SPLIT_NO_EMPTY
28 */
29const PREG_SPLIT_NO_EMPTY = UNKNOWN;
30/**
31 * @var int
32 * @cvalue PREG_SPLIT_DELIM_CAPTURE
33 */
34const PREG_SPLIT_DELIM_CAPTURE = UNKNOWN;
35/**
36 * @var int
37 * @cvalue PREG_SPLIT_OFFSET_CAPTURE
38 */
39const PREG_SPLIT_OFFSET_CAPTURE = UNKNOWN;
40/**
41 * @var int
42 * @cvalue PREG_GREP_INVERT
43 */
44const PREG_GREP_INVERT = UNKNOWN;
45/**
46 * @var int
47 * @cvalue PHP_PCRE_NO_ERROR
48 */
49const PREG_NO_ERROR = UNKNOWN;
50/**
51 * @var int
52 * @cvalue PHP_PCRE_INTERNAL_ERROR
53 */
54const PREG_INTERNAL_ERROR = UNKNOWN;
55/**
56 * @var int
57 * @cvalue PHP_PCRE_BACKTRACK_LIMIT_ERROR
58 */
59const PREG_BACKTRACK_LIMIT_ERROR = UNKNOWN;
60/**
61 * @var int
62 * @cvalue PHP_PCRE_RECURSION_LIMIT_ERROR
63 */
64const PREG_RECURSION_LIMIT_ERROR = UNKNOWN;
65/**
66 * @var int
67 * @cvalue PHP_PCRE_BAD_UTF8_ERROR
68 */
69const PREG_BAD_UTF8_ERROR = UNKNOWN;
70/**
71 * @var int
72 * @cvalue PHP_PCRE_BAD_UTF8_OFFSET_ERROR
73 */
74const PREG_BAD_UTF8_OFFSET_ERROR = UNKNOWN;
75/**
76 * @var int
77 * @cvalue PHP_PCRE_JIT_STACKLIMIT_ERROR
78 */
79const PREG_JIT_STACKLIMIT_ERROR = UNKNOWN;
80/**
81 * @var string
82 * @cvalue php_pcre_version
83 */
84const PCRE_VERSION = UNKNOWN;
85/**
86 * @var int
87 * @cvalue PCRE2_MAJOR
88 */
89const PCRE_VERSION_MAJOR = UNKNOWN;
90/**
91 * @var int
92 * @cvalue PCRE2_MINOR
93 */
94const PCRE_VERSION_MINOR = UNKNOWN;
95/**
96 * @var bool
97 * @cvalue PHP_PCRE_JIT_SUPPORT
98 */
99const PCRE_JIT_SUPPORT = UNKNOWN;
100
101/**
102 * @param array $matches
103 * @frameless-function {"arity": 2}
104 */
105function preg_match(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0): int|false {}
106
107/** @param array $matches */
108function preg_match_all(string $pattern, string $subject, &$matches = null, int $flags = 0, int $offset = 0): int|false {}
109
110/**
111 * @param int $count
112 * @return string|array<int|string, string>|null
113 * @frameless-function {"arity": 3}
114 */
115function preg_replace(string|array $pattern, string|array $replacement, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
116
117/**
118 * @param int $count
119 * @return string|array<int|string, string>|null
120 */
121function preg_filter(string|array $pattern, string|array $replacement, string|array $subject, int $limit = -1, &$count = null): string|array|null {}
122
123/**
124 * @param int $count
125 * @return string|array<int|string, string>|null
126 */
127function preg_replace_callback(string|array $pattern, callable $callback, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
128
129/** @param int $count */
130function preg_replace_callback_array(array $pattern, string|array $subject, int $limit = -1, &$count = null, int $flags = 0): string|array|null {}
131
132/**
133 * @return array<int|string, string|array>|false
134 * @refcount 1
135 */
136function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array|false {}
137
138/** @compile-time-eval */
139function preg_quote(string $str, ?string $delimiter = null): string {}
140
141/** @refcount 1 */
142function preg_grep(string $pattern, array $array, int $flags = 0): array|false {}
143
144function preg_last_error(): int {}
145
146function preg_last_error_msg(): string {}
147