Im trying to dump the contents of a variable being called asychronously
<p>The function looks like this:</p>

<pre><code>public function insert_record($table, $dataobject) {
  $dataobject = (array)$dataobject;

  $columns = $this-&gt;get_columns($table);
  $cleaned = array();

  $fp = fopen('../../data.txt', 'w');

    foreach ($dataobject as $field =&gt; $value) {
      //fwrite($fp,  print_r($field), print_r($value) );
      // fwrite($fp,  print($field), print($value) );
      // fwrite($fp, var_export($value) );
    }

  fclose($fp);
}
</code></pre>

<p>I am trying, and failing miserably, to see inside the $dataobject variable. I am writing to a file because this function is called asynchronously and so I cannot break and var_dump().</p>

<p>Any ideas how I can look/dump/print/echo the contents of that variable?</p>

<p>thank you.</p>
