public function getPhantomJsVersionFromBinary($pathToBinary)
    {
        $io = $this->getIO();

        try {
            $cmd = escapeshellarg($pathToBinary) . ' -v';
            exec($cmd, $stdout);
            $version = $stdout[0];
            return $version;
        } catch (\Exception $e) {
            $io->warning("Caught exception while checking PhantomJS version:\n" . $e->getMessage());
            $io->notice('Re-downloading PhantomJS');
            return false;
        }
    }
public function getPhantomJsVersionFromBinary($pathToBinary)
    {
        $io = $this->getIO();

        try {
            $cmd = escapeshellarg($pathToBinary) . ' -v';
            exec($cmd, $stdout);
            $version = $stdout[0];
            return $version;
        } catch (\Exception $e) {
            $io->warning("Caught exception while checking PhantomJS version:\n" . $e->getMessage());
            $io->notice('Re-downloading PhantomJS');
            return false;
        }
    }
public function getPhantomJsVersionFromBinary ( $ pathToBinary ) { $ io = $ this -> getIO ( ) ; try { $ cmd = escapeshellarg ( $ pathToBinary ) . ' -v' ; exec ( $ cmd , $ stdout ) ; $ version = $ stdout [ 0 ] ; return $ version ; } catch ( \ Exception $ e ) { $ io -> warning ( "Caught exception while checking PhantomJS version:\n" . $ e -> getMessage ( ) ) ; $ io -> notice ( 'Re-downloading PhantomJS' ) ; return false ; } }
Get PhantomJS application version. Equals running "phantomjs -v" on the CLI.

@param string $pathToBinary
@return string PhantomJS Version
Get PhantomJS application version . Equals running phantomjs - v on the CLI .