The PHP statement echo and the functions
var_dump(), debug_zval_dump(), and
print_r() are common and popular debugging aids that can help solve a variety of issues. However, these statements and even more robust instrumentation is what is called Xdebug, which is a very popular tool for PHP developers around the world. The creator of this tool, Derick Rethans, called this tool as the PHP developer's swiss-army knife. Xdebug's basic functions include the display of stack traces on error conditions, maximum nesting level protection, and time tracking.
Debugging through deduction is a brute-force approach. You collect data and shift through it, trying to deduce what's happened. If you lack vital information, you must ...