Skip to content

Latest commit

 

History

History
9 lines (6 loc) · 553 Bytes

README.md

File metadata and controls

9 lines (6 loc) · 553 Bytes

I was looking to do some simple find/replace refactoring but rather than spend my time crafting clever regexes I decided I'd rather play around with the PHP AST and php-parser.

MutatingVisitor visits each node and conditionally applies a given mutation. MutatingParser is a wrapper around the php-parser boilerplate.

Get dependencies with composer install

array.php is an example that replaces all array() notation with [] notation.