Dump your PHP Variables with var_dump()

To find out the full details of any given variable in php, simply use var_dump() as follows:

var_dump($variable);

This will show you the php variable type, its value and if it is an object or array the structure and all information will be explored recursively.

The only slight disadvantage to using var_dump() is that the output is sent directly to the browser, with no parameter to control this. If you wish to email the details for example, you will have to use the php output control functions (output buffering).

Are you a Developer, Designer or Copy Writer? Or Looking For One?

Click here to see 100s of jobs updated every day that you can complete to earn good money. Also find that programmer, designer or copy writer you have been looking for - advertise and get the best guy for your job - click here to find out more

1 Comment so far

  1. Craig Vincent on August 15th, 2008

    I often make use of dBug, to get slightly better (or at least better presented) debug info out of PHP, take a look at http://dbug.ospinto.com/ if you’ve not seen it before :o)

Leave a Reply

Make $100,000/Month - Every Month!

It Works! We Make Our Customers Millionaires! Act now and get $600 bonus and a Free Money Making Website! - click to get started