-1

I have a method to dump a var_dump output to a file, as such:

function dumpToFile($object) {
    $file = "c:/tmp/php.log";
    ob_start();
    var_dump($object);
    $output = ob_get_clean();

    $fh = fopen($file, "a+");
    fwrite($fh, $output."\r\n");

}

Out of nowhere, the output of this is always starting with a tag like this and has some characters that are HTML encoded, like &quot

<pre class='xdebug-var-dump'> dump content... </pre>

I don't remember changing the PHP.ini file, any ideas ? I'm using php-cgi.exe under Windows.

var_dump itself outputs the garbled data, so it's not my method as far as I can see.

Francis Ducharme
  • 4,848
  • 6
  • 43
  • 81

1 Answers1

1

Seems like your xdebug has been enabled. See below post on how to disable:

https://stackoverflow.com/a/8754934

Community
  • 1
  • 1
AlexBik
  • 26
  • 4