Merge master -> php
Cleaned up PHP patterns
Added global pattern
Fixed HTML markup