php how to check if system commands are available for use?
<p>How do i check if system commands like exec() , popen() , etc are available to use ?</p>

<p>Something like this :</p>

<pre><code>&lt;?php
function($cmd)
{
if($cmd available)
{
//do nothing
}
else
{
exit();
}
}
?&gt;
</code></pre>

<p>And check if the php file has access to a command eg. If safe mode is on it should return false.</p>
