PHPMatcher is a simple php library created to match values against patterns. It's mostly used for API's functional tests where response needs to be compared against patterns with placeholders for variables.
This website is a sandbox for the library, give it a try: