I want to rewrite a function in PHP (let\'s say the mail() function), and want to make it so when I call mail() from now on, it will load my version of mail() and not the de
You can use regexps to replace the function name in your files. What app you use is up to you, but I'd recommend the ovely-pricey Powergrep (unless you won't need it again).
replace
(\s+)mail([\s(]+)
to
$1new_function_name$2
and
^mail([\s(]+)
to
new_function_name$1
Sorry for my regexp-fu, I don't know how to search for either spaces OR begining of line in one expression.