PHP Readable var_dump

PHP Readable var_dump is a small tool which can help make output from var_dump easier to read.

How it works:

  • Copy the whole out of var_dump() from your developing site
  • Paste copied text to the textarea below
  • Use “Convert” button

How the converted var_dump result will look like:

object(WP_Post)#789 (24) {
[“ID”]=> int(123)
[“post_author”]=> string(1) “1”
[“post_date”]=> string(19) “2017-11-09 15:23:21”
[“post_date_gmt”]=> string(19) “2017-11-09 15:23:21”
[“post_content”]=> string(346) “Short body content goes here”
[“post_title”]=> string(21) “PHP Readable var_dump”
[“post_excerpt”]=> string(0) “”
[“post_status”]=> string(7) “publish”
[“comment_status”]=> string(6) “closed”
[“ping_status”]=> string(6) “closed”
[“post_password”]=> string(0) “”
[“post_name”]=> string(21) “php-readable-var_dump”
[“to_ping”]=> string(0) “”
[“pinged”]=> string(0) “”
[“post_modified”]=> string(19) “2017-11-10 07:57:00”
[“post_modified_gmt”]=> string(19) “2017-11-10 07:57:00”
[“post_content_filtered”]=> string(0) “”
[“post_parent”]=> int(0)
[“guid”]=> string(56) “”
[“menu_order”]=> int(0)
[“post_type”]=> string(4) “tool”
[“post_mime_type”]=> string(0) “”
[“comment_count”]=> string(1) “0”
[“filter”]=> string(3) “raw” }

What is var_dump()?

This is a method which dumps information about a variable. It is the most used method to debug array or object while coding in PHP.

However, the display of this method makes it hard to read information. That’s why this online tool, PHP Readable var_dump, can help developers read information of an array or object easier.