Trying to debug PHP using its default current-line-only error messages is horrible. How can I get PHP to produce a backtrace (stack trace) when errors are produced?
This is how you do it:
set_error_handler(function($errorType){ if(error_reporting() & $errorType){ ?> debug_print_backtrace(); ?> } }) ;
debug_print_backtrace(); ?>
It requires PHP 5.3+ since it uses a closure. If you need lower PHP support just convert the closure to a normal function.