There are probably less verbose solutions, but here we go:
for i in *; do sed -i 's/old/new/g' "$i"; done
Mind you, it will only work on the current level of the file system, files in subdirectories will not be modified. Also, you might want to replace * with *.php, or make backups (pass an argument after -i, and it will make a backup with the given extension).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…