Where are all my PHP variables hiding?


Sometimes it's difficult to remember what variables you have available to you at any given time, especially if your script is split into functions, or in my case you're working with Drupal, where there's a whole slew of variables available at your disposal, if only you know what they were called. Lucky for curious folks like us, there's a couple native PHP functions that will clear things up:

//Returns an array of all variables and their values. Sweet!

//Prints out the contents of whatever variable you pass to it.

Syndicate content
Implied By Design Logo