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
It's called function overloading and is not possible in native PHP but possible using the extensions outlined in the other answers. The PHP documentation claims it is not possible at all: source which is incorrect.