find . -name *.php -exec sed -i 's/oldtext/newtext/g' {} \;
find . -name .svn -prune -o -exec sed -i 's/oldtext/newtext/g' {} \;
My understanding:
find files starting with . (local directory)
-name .svn -prune means if you find .svn for a filename (directory name), skip it.
-o OR
-exec execute
sed -i sed is the stream editor. -i means change the files in place.
's/new/old/g' Substitute old text for new text Globally.
{} sends the filenames that find found to sed
\; terminates the -exec from find, and \ escapes it so the shell won't think it means to end its command.