Following this topic: How to handle obsolete functions in the library? I want to find a way to track all calls to an obsolete function so that I can make sure they are all replaced before the function is deleted. Given the following PHP methods
function getFoo(){
return getBar();
}
function getBar(){
return "bar";
}
I came up with the following way to do this, and I'm looking for feedback.
function getFoo(){
try{
throw new Exception("Deprecated function used");
} catch(Exception $e){
....
return getBar();
}
}
source
share