Debug Class

The Debug class is a simple utility for debugging variables, objects, arrays, etc by outputting information to the display. This is not meant as a one-stop-shop to all of your debugging needs, but as a simple way to throw out information quickly to check things as you go.

dump(*$args)

The dump method outputs multiple mixed values to the browser in a formatted structured way and includes backtrace information so you know where it is coming from.

Static Yes
Parameters Unlimited mixed arguments
Returns void
Example
Debug::dump($stuff, 'junk', array('whatever'));

By default nested structures will be displayed collapsed to minimize the impact of the output on the page layout. You can alter this behaviour and have it expand by default by setting Debug::$js_toggle_open to true.

backtrace()

The backtrace method shows the file and line the method is called from and a list of all previous.

Static Yes
Parameters None
Returns void
Example
Debug::backtrace();

classes()

Output a list of all classes currently defined in the PHP runtime.

Static Yes
Parameters None
Returns void
Example
Debug::classes();

interfaces()

Output a list of all interface classes currently defined in the PHP runtime.

Static Yes
Parameters None
Returns void
Example
Debug::interfaces();

includes()

Output a list of all included files currently loaded in the PHP runtime.

Static Yes
Parameters None
Returns void
Example
Debug::includes();

functions()

Output a list of all functions currently defined in the PHP runtime.

Static Yes
Parameters None
Returns void
Example
Debug::functions();

constants()

Output a list of all constants currently defined in the PHP runtime.

Static Yes
Parameters None
Returns void
Example
Debug::constants();

extensions()

Output a list of all extensions loaded by PHP.

Static Yes
Parameters None
Returns void
Example
Debug::extensions();

headers()

Output a list of all HTTP headers the server was requested with.

Static Yes
Parameters None
Returns void
Example
Debug::headers();

phpini()

Prints a list of the configuration settings read from php.ini

Static Yes
Parameters None
Returns void
Example
Debug::phpini();