Debugging with functions.php

You can use var_dump() instead of print_r() – you get the type and the value of the variable and it will also work when your variable holds FALSE or NULL.

print_r( false ); # doesn't output anything
var_dump( false ); # output: bool(false)

print_r( NULL ); # doesn't output anything
var_dump( NULL ); # output: NULL

If you have arrays or objects to inspect, you could use a plugin like Kint Debugger to format the output into a more readable format.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)