

PHP has a few ways to configure error reporting. Each function has a purpose and can be useful for debugging.

You can see them in action in this Paiza. These functions are a quick way to debug your PHP code. Here’s sample code that exercises each of these useful debugging functions: You can print_r, log it to a file, or send it to a logging endpoint asynchronously.

When you need a simple way to debug programs and you have no other options, you can usually output values.
