I don't see alternative versions from my side.
> brew search phantomjs
==> Searching local taps...
phantomjs
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...
But in principle, if there are
> brew search gnupg
==> Searching local taps...
gnupg gnupg-pkcs11-scd [email protected] [email protected]
==> Searching taps on GitHub...
homebrew/php/php53-gnupg homebrew/php/php55-gnupg homebrew/php/php70-gnupg
homebrew/php/php54-gnupg homebrew/php/php56-gnupg homebrew/php/php71-gnupg
==> Searching blacklisted, migrated and deleted formulae...
you'd install it by specifying the version
> brew install [email protected]