Code:
#!/bin/bash
ls *.php4 | while read f ; do
mv $f ${f%4}
done
Note that this does
not check if the destination file allready exists!
You could also install the "mmv" (Multiple MoVe), if it's not allready installed on your system. "mmv" is made especially for this kind of thing, so you wouldn't need a script, but just one mmv command.