php in debug mode code example
Example 1: how to debug in php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
Example 2: php best debugging functions
<?php
$myVar = "hello world!";
var_dump($myVar);
print_r($myVar);
$allVars = get_defined_vars();
print_r($allVars);
debug_zval_dump($allVars);
function sayHello($hello) {
echo $hello;
debug_print_backtrace();
}
sayHello($myVar);
?>