0
If I have a huge project and I realize that somewhere in the code, a function is being called, but I don’t know where it is, is there any way to find out?
Example:
#index.php
// nada aqui nesse script
#config.php
$config['database'] = config('database');
#view.php
$base_url = config('base_name');
I’d like something like:
descubra_onde_a_funcao_foi_chamada('config');
And so return something like:
array(
0 => array( 'file' => 'config.php', 'line' => 10),
1 => array('file' => 'view.php', 'line' => 15)
);
You can do something like this, in PHP, in the same way I demonstrated in the example function?
http://answall.com/questions/94628/existe-alguma-forma-de-saber-quantas-vezes-a-fun%C3%A7%C3%A3o-called possible duplicate @Wallace ?
– Gabriel Rodrigues
Location where the function was called is different from how many times it was called. Help me out, here!
– Wallace Maxters
got it, would you find it too broad to gather this question in the other ? a function that checks where it was called and counts how many times it was executed ?
– Gabriel Rodrigues
Yes, they are different subjects. Unless the function does both, without complicating the midfield.
– Wallace Maxters
@Gabrielrodrigues, I usually group questions, but sometimes it is impossible (I don’t like giant answers)
– Wallace Maxters