escapeshellcmd

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Escape shell metacharacters
<?php escapeshellcmd(string $command): string
<?php     protected function openViaBuiltInStrategy($url)

    {

        if ($this->systemOsFamily === 'Windows') {

            $process = tap(Process::fromShellCommandline(escapeshellcmd("start {$url}")))->run();



            if (! $process->isSuccessful()) {

                throw new ProcessFailedException($process);
<?php             return;

        }



        $process = tap(Process::fromShellCommandline(escapeshellcmd("{$binary} {$url}")))->run();



        if (! $process->isSuccessful()) {

            throw new ProcessFailedException($process);
<?php         $string = str_replace('"', '', $string);

        $string = str_replace("'", '', $string);



        return escapeshellcmd($string);

    }

}
<?php     {


        if (true === $input->getOption('editor')) {

            $editor = escapeshellcmd(Platform::getEnv('EDITOR'));

            if (!$editor) {

                if (Platform::isWindows()) {

                    $editor = 'notepad';
<?php             'COMPOSER_CACHE_DIR' => $this->testDir.'cache',

        );



        $proc = Process::fromShellCommandline(escapeshellcmd(PHP_BINARY).' '.escapeshellarg(self::$pharPath).' --no-ansi '.$testData['RUN'], $this->testDir, $env, null, 300);

        $output = '';



        $exitCode = $proc->run(function ($type, $buffer) use (&$output) {