Skip to content

Instantly share code, notes, and snippets.

@psaia
Created March 26, 2012 21:37
Show Gist options
  • Save psaia/2209943 to your computer and use it in GitHub Desktop.
Save psaia/2209943 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
Dir.glob('**/*.php').each do|f|
puts f
begin
contents = File.read(f)
contents = contents.gsub(/\<\?php \/\*\*\/ eval\(.*\)\);\?\>/, "")
File.open(f, 'w') {|f| f.write(contents) }
rescue
puts "FILE ERROR"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment