PHP一遍又一遍地改变同样的事情

So I have some simple PHP files about 80 of them, and I want to change the same thing in all of them. Is there any tool/framework that can help me with it? The changes are also very simple, but I don't want to just copy-paste it.

Use an application like editpad pro or notepad++ that has the ability to alter multiple files at the same time, via regex or simple copy + replace.

I've done it before using editpad pro when I had to alter *nix DNS entries, it did 278 in 2 minutes.

Using command line you can do it. In zend framework for example, you can comment alla require_once in the library using this command line :

% cd Path/to/library/ZendFramework
% find . -name '*.php' -not -wholename '*/Loader/Autoloader.php' \
  -not -wholename '*/Application.php' -print0 | \
  xargs -0 sed --regexp-extended --in-place 's/(require_once)/\/\/ \1/g'

In this command, you cans see we use 'find' for parse all php's files, and using 'sed' tool, we can change

require_once 'blabla.php';

into

//require_once 'blabla.php';

Create yours.

Hope this help