It could be useful sometimes to know what variables are defined at particular point of PHP script in order to have a better understanding of the code you are debugging. In contrast with C++, PHP has a magic function get_defined_vars ( void ) that returns an array of all defined variables with their values so we can output all variable names with the following line of code:
print_r(array_keys(get_defined_vars()));