private static function isCommandAvailable(string $command): bool
    {
        if (!is_callable('shell_exec') || stripos(ini_get('disable_functions'), 'shell_exec') !== false) {
            return false;
        }

        $result = null;
        if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
            $result = @shell_exec('which '.$command);
        }

        return !empty($result);
    }