title: exec() (or like functions) pass back error output
body: <p>I can pass back output of the executed script, but I get no error output if the script errors out.</p>
  
  <pre><code>// This is a file that doesn't exists, for testing
  $command = './path/to/non/existing/script.sh';
  
  $commandOutput = exec($command, $commandOutput); // works but no error output
  //passthru($command, $commandOutput); // works but error output was 127 not file not found
  //$commandOutput = escapeshellcmd($command);
  echo "The Output:\n|".$commandOutput."|\n";
  var_dump($commandOutput);
  
  The Output:
  
  ||
  </code></pre>
  
  <p>I would like the output of the error message:</p>
  
  <pre><code>The Output:
  
  |file not found|
  </code></pre>
  
  <p>How or what function/parameter would do this?</p>