elseif ($is_osx === 0
) { $cmd = 'open ' .
$url;
} if (empty($cmd)) { $io->
getErrorStyle() ->
error('No suitable browser opening command found, open yourself: ' .
$url);
return;
} if ($io->
isVerbose()) { $io->
writeln("<info>Browser command:</info>
$cmd"
);
} // Need to escape double quotes in the command so the PHP will work.
$cmd =
str_replace('"', '\"',
$cmd);
// Sleep for 2 seconds before opening the browser. This allows the command
// to start up the PHP built-in webserver in the meantime. We use a
// PhpProcess so that Windows powershell users also get a browser opened
// for them.
$php = "<?php sleep(2); passthru(\"
$cmd\"); ?>";
$process =
new PhpProcess($php);