preg_match()
function preg_match(string $pattern, string $subject, array $matches = []): int
Performs a regular expression match.
Parameters:
$pattern(string)$subject(string)$matches(array), passed by reference, default[], optional
Returns: int
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/regex/preg_match.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how preg_match is implemented in the compiler, see the internals page.