function binary($path) {
        if (function_exists('exec')) {
            exec($path.' -v 2>&1',$out,$ret);
            if ($ret==0 && preg_match('/cli/',@$out[0],$out))
                $this->binary=$path;
        }
        return $this->binary;
    }
function binary($path) {
        if (function_exists('exec')) {
            exec($path.' -v 2>&1',$out,$ret);
            if ($ret==0 && preg_match('/cli/',@$out[0],$out))
                $this->binary=$path;
        }
        return $this->binary;
    }
function binary ( $ path ) { if ( function_exists ( 'exec' ) ) { exec ( $ path . ' -v 2>&1' , $ out , $ ret ) ; if ( $ ret == 0 && preg_match ( '/cli/' , @ $ out [ 0 ] , $ out ) ) $ this -> binary = $ path ; } return $ this -> binary ; }
Set binary path after checking that it can be executed and is CLI
@param string $path
@return string
Set binary path after checking that it can be executed and is CLI