View difference between Paste ID: K0YksXE9 and st4fyX3P
SHOW: | | - or go back to the newest paste.
1
# Gerhard Kollinger (http://kollinger.it/+)
2
define("MY_IP", "89.23.232.21");
3
4
function silentDebug($info = NULL, $mixedOutputVar = 'no_value', $dieAfter = NULL, $htmlCommented = TRUE) {
5
  if($_SERVER['REMOTE_ADDR'] == MY_IP) {
6
    if($mixedOutputVar != 'no_value') {
7
      $output = is_array($mixedOutputVar) ? print_r($mixedOutputVar, TRUE) : $mixedOutputVar;
8
      $output = is_string($output) ? $output : var_export($output, TRUE);
9
      if($htmlCommented) {
10
        echo '<!--'.$info.': '.$output.'-->'."\n";
11
      }else {
12
        echo $info.': '.$output.'<br />'."\n";
13
      }
14
      if($dieAfter) {
15
        die();
16
      }
17
    }
18
  }
19
  return;
20
}