Is there a way to find out the varibles declared or used in a script? and their values too?
I need this method for debuging purpose.
example:
$variable1 = "Hello"; $variable2 = "World"; ...... printVariables();
thanks!:rolleyes:
function printVariables() { foreach (get_defined_vars() as $key => $temp) { echo " $key \n"; echo " $temp \n"; } }
This should be a start. This function is not complete for some of the defined variables might be arrays.