Skip to content

Instantly share code, notes, and snippets.

@cam8001
Created September 12, 2012 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cam8001/3706023 to your computer and use it in GitHub Desktop.
Save cam8001/3706023 to your computer and use it in GitHub Desktop.
Find mismatched closing tags in php files
#!/bin/bash
# Find extra ?> tags in a PHP source tree.
# Much thanks to chx (drupal4hu.com) who gave me the regex!
ack '<\?php.*\?>(.(?!<\?php))+\?>' .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment