title: How to 'console log' PHP code in Chrome or Firefox?
body: <p>I've been looking up how I can debug PHP code in Chrome or Firefox but I can;t really find a solution. This is my PHP:</p>
  
  <pre><code>&lt;?php
      if(isset($_POST["data"]))
      {
          $var = $_POST["data"];
          print "your message: " . $_POST["data"];
          if(!empty($_POST['ip.data'])){
          $data = $_POST['ip.data'];
          $fname = mktime() . ".txt";//generates random name
  
          $file = fopen("upload/" .$fname, 'w');//creates new file
          fwrite($file, $data);
          fclose($file);
          }
      }
  ?&gt;
  </code></pre>
  
  <p>I want to be able to see the output of <code>print "your message: " . $_POST["data"];</code> or any errors in Chrome or Firefox. I've tried Firefox Quantum that should be able to debug php? Anyways, how can I console log this?</p>