How to display all Global variables in PHP

Sometimes when debugging an application you need to see all global variables.

In PHP there is an easy way:

  1. $defined_vars = get_defined_vars();
  2. print_r($defined_vars);

Tags: , , ,

Comments are closed.