php debug tools code example
Example 1: debug php
$a = 123
echo ($a);
exit;
$array = array(
1 => 'apple',
2 => 'banana',
)
echo "<pre>";
print_r($array);
echo "</pre>";
echo "<pre>";
var_dump($array);
echo "</pre>";
dd($array)
pr ($array);
$json = {"a":"123"}
pr (json_encode($json));
exit;
print_r (json_encode($json));
exit;
Example 2: Best debugging tools for php
Xdebug, PHP DebugBar , MacGDBp, Kint, Whoops, Krumo, Pinba, Gubed PHP Debugger, DBG, and PHP_Dyn are some best debugging tools for php.