src/Composer/Command/HomeCommand.php
private function openBrowser($url)
    {
        $url = ProcessExecutor::escape($url);

        if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
            return passthru('start "web" explorer "' . $url . '"');
        }

        passthru('which xdg-open', $linux);
        passthru('which open', $osx);

        if (0 === $linux) {
            passthru('xdg-open ' . $url);
        } elseif (0 === $osx) {
            passthru('open ' . $url);
        } else {
            $this->getIO()->writeError('no suitable browser opening command found, open yourself: ' . $url);
        }
    }
private function openBrowser($url)
    {
        $url = ProcessExecutor::escape($url);

        if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
            return passthru('start "web" explorer "' . $url . '"');
        }

        passthru('which xdg-open', $linux);
        passthru('which open', $osx);

        if (0 === $linux) {
            passthru('xdg-open ' . $url);
        } elseif (0 === $osx) {
            passthru('open ' . $url);
        } else {
            $this->getIO()->writeError('no suitable browser opening command found, open yourself: ' . $url);
        }
    }
private function openBrowser ( $ url ) { $ url = ProcessExecutor :: escape ( $ url ) ; if ( defined ( 'PHP_WINDOWS_VERSION_MAJOR' ) ) { return passthru ( 'start "web" explorer "' . $ url . '"' ) ; } passthru ( 'which xdg-open' , $ linux ) ; passthru ( 'which open' , $ osx ) ; if ( 0 === $ linux ) { passthru ( 'xdg-open ' . $ url ) ; } elseif ( 0 === $ osx ) { passthru ( 'open ' . $ url ) ; } else { $ this -> getIO ( ) -> writeError ( 'no suitable browser opening command found, open yourself: ' . $ url ) ; } }
opens a url in your system default browser

@param string $url
opens a url in your system default browser