Skip to content

Instantly share code, notes, and snippets.

@bxt
Created February 26, 2011 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bxt/845320 to your computer and use it in GitHub Desktop.
Save bxt/845320 to your computer and use it in GitHub Desktop.
Get rid of PHP short tags with these regexp
replace "<\?=\$(.*)\?>" to "<?php echo \$\1; ?>"
and then "<\?(?!php)" to "<?php"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment