There are some times when I need to check some variables or run a full error reporting but I don’t want to let anyone see what’s going on.
So a quick solution is to allow my code to run what I want for specific IP Address (which is my IP Address)
$allowed_ip = '220.127.116.11';
$this_ip = $_SERVER['REMOTE_ADDR'];
if ($this_ip == $allowed_ip)
// Do something such as allowing ALL error_reporting
// E.g.: error_reporting(E_ALL);
This PHP snippet is handy if you need to do
var_dump(), or even test a block of code.
Don’t forget to change the IP address to your IP Address.
There are a lot of ways to find out your IP Address. One of them is whatismyip.com.