Key Concepts

This section explains the fundamental concepts behind PHPRegex and regular expressions. Its pages sit at two altitudes: start with the foundations if the ideas are new to you, and read the deep dives when you build tooling on top of the library.

Foundations

Start here if ASTs or the visitor pattern are new to you. These two pages assume nothing and explain the data model every PHPRegex feature builds on:

Deep dives

These pages are written for tool authors — the people behind PHPStan extensions, linters and code generators. They assume the foundations and go into engine internals:

When to read these

Edit on GitHub