print_r(get_defined_vars());
get_defined_vars — Returns an array of all defined variables
print_r(get_defined_functions());
get_defined_functions — Returns an array of all defined functions
You should be careful about the location in the code, because if you are inside a function it will work only for this function.
print_r(get_defined_constants());
get_defined_constants – Returns list all defined constants with their respective values
print_r(get_declared_classes());
get_declared_classes – Returns list all declared classes
print_r(memory_get_usage());
memory_get_usage — Returns the amount of memory allocated to PHP