title: What is the PHP exec() return value?
body: <p>I am trying to use the PHP exec() function.</p>
  
  <blockquote>
    <p>If the return_var argument is present along with the output argument,
    then the return status of the executed command will be written to this
    variable.</p>
  </blockquote>
  
  <p>If the execution was successful, it's 0. However, if there is an error, it can be a multitude of other integers. I can't seem to find anywhere what those integers correspond to. How should I interpret the integer that I get?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I really should have specified this originally, but I am executing another PHP script. Unlike rsync, which has exit values on its man page, I can't find an equivalent for PHP.</p>
  
  <p>So what I am doing is something like:</p>
  
  <pre><code>$rv = exec('php file.php', $out, $rv);
  </code></pre>