Regular Expressions 101

Community Patterns

Match all PHP function or method calls including inside the opening and closing curly braces/brackets


Regular Expression
PCRE2 (PHP >=7.3)



Capture PHP Function/Class Methods

Use regular expression to capture the whole method/function. Parse static PHP code for functions and class methods. Useful for getting tokens and possibly use to generate a Call-Graph for debugging.

Submitted by - 2 months ago