Compiles rules once and returns a callable dispatcher. Use this when you
want to separate compile-time from call-time, or when the rules array
identity changes per call but its content doesn't (match() keys its cache
on array identity, so a rebuilt array misses it — compile() doesn't care).
Compiles
rulesonce and returns a callable dispatcher. Use this when you want to separate compile-time from call-time, or when the rules array identity changes per call but its content doesn't (match() keys its cache on array identity, so a rebuilt array misses it — compile() doesn't care).