VersionPress\Utils\ProcessUtils::escapeshellargWindows PHP 메소드

escapeshellargWindows() 개인적인 정적인 메소드

Windows shell escaping from Drush:
private static escapeshellargWindows ( $arg ) : mixed | string
$arg
리턴 mixed | string
    private static function escapeshellargWindows($arg)
    {
        // Double up existing backslashes
        $arg = preg_replace('/\\\\/', '\\\\\\\\', $arg);
        // Double up double quotes
        $arg = preg_replace('/"/', '""', $arg);
        // Double up percents.
        $arg = preg_replace('/%/', '%%', $arg);
        // Add surrounding quotes.
        $arg = '"' . $arg . '"';
        return $arg;
    }