Un pic de bash + perl
find . -type f -name \*.php -exec grep -rl 'isset($GLOBALS' {} \; |xargs -i -n 1 perl -pi -e "s/^<\?php.+isset\(\$GLOBALS.*$/\<\?php/g" {} |
Ce face – cauta in toate fisierele php care contin <\?php + $GLOBALS si inlocuieste cu <\?php