TVarDumper
This is a great tool which is intended to replace the buggy PHP function var_dump
and print_r
, since it can correctly identify the recursively referenced objects in a complex object structure. It also has a recursive depth control to avoid indefinite recursive display of some peculiar variables.
See: TVarDumper.php.
For other alternative solutions which provides more advantages over var_dump
and print_r
and can support circular references, please check: Using print_r and var_dump with circular reference.
For more ideas, check also: How do you debug PHP scripts?