I would like to know if in PHP there is some way to find out how many times a given function has been called.
I am speaking natively, since I would also like to do this check for native functions.
Example:
var_dump($_POST);
var_dump($_GET);
get_function_called_number('var_dump'); // int(2)
To satisfy just the requirements of the question, I'll already demonstrate in the question that I know how to do this for functions I've created.
So:
function call_me()
{
static $count = 0;
$count++;
var_dump($count);
}
call_me(); // imprime int(1)
call_me(); // imprime int(2)
But I would like a solution to know about native functions.