title: What are the differences of system(), exec() and shell_exec() in PHP?
body: <p>It is possible to run an external command by three PHP functions of</p>
  
  <pre><code>system();
  exec();
  shell_exec();
  </code></pre>
  
  <p>but what are their differences? In spite of their specific applications, in most cases, the can be equally used. I am curious to know which is preferred one when they can be equally used. For example, for unzipping a file or compressing a folder (with tar command), which one is preferred (probably from performance point of view)?</p>
  
  <p><strong>UPDATE:</strong> In another question, I found a very useful <strong><a href="http://web.archive.org/web/20130809032648/http://chipmunkninja.com/Program-Execution-in-PHP%3A-exec-m@">link</a></strong> describing different aspects for these functions. I share the link here, as other may use to better understand security issues and other aspects.</p>