How can i modify returning value of built-in php function without creating new function with another name and renaming all of used functions with previous name to new one?
e.g.
function time() {
return time()-1000;
}
Of course this won’t pass, isn’t there something like “function time() extends time() {}” or similar?
With the APD PECL extension you can rename and override built-in functions.
APD is intended for debugging purposes, so this isn’t a technique you should really consider for production code.