title: How to differentiate between http and cli requests?
body: <p>The title is quiet straightforward. I have to know on server side if the script called through HTTP request or by command line. I could examine the <code>$_SERVER['argv']</code> or <code>$_SERVER['argc']</code>.<br>
  What is the <strong>pragmatic</strong> way to do that?</p>