I am maintaining an OO PHP application that loads everything to $this array. When I do a var dump on $this to find out how to access a value, I get dozens of pages of output. Hunting down the array elements that I need is very time consuming
For example, if I want to find where Customer Territory is stored, I have to figure out the heirarchy of the array using print_r or var_dump and staring [edit: and searching] ]at the output until I figure out the path.
for example:
$this->Billing->Cst->Record[‘Territory’]
Is there a better way to do this, or some tools/techniques that I can use. For instance, is there there quick way to find the path to variable [‘Territory’] throughout the array directly?
Krumo is a graphical “var_dump” tool that may make navigation a tiny bit easier. Check out the “examples” section on the project page.
For searching in multi-dimensional arrays, this SO question may help you.