I can’t remember how many times I needed this line recently. I also could never remember it (hm… do you see a pattern here?). So here it is for future reference:
find . -name "*.php" -print | xargs sed -i '.backup' 's/foo/bar/g'
It’s pretty much self explanatory. If I could only make it stick in my brain.