Created
June 29, 2021 10:18
-
-
Save sparkcodeuk/c3f9f1694236b81a05575e416c1b8b81 to your computer and use it in GitHub Desktop.
Recursively remove PHP short tags from a codebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -name '*.php' -print0|xargs -0 -n1 perl -i -pe 's/<\?(?!(=|php))(\s?)/<?php$2/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment