Traverse `{` and `}` in PHP
Merge common functionality
Use a named register `s`