How does the file with the .php~ get on the server in the first place? Did the person upload it separately from the normal .php file? So are there two different files on the server (one .php and one .php~) and is the tilde visible when looking through your files with an ftp client?
ETA: Thanks so much for sharing the info!