title: How can I install php7.1 using brew in 2020
body: <p>I refered to some tutorials in google, but they do not work, I guess those methods are outdated.</p>
  
  <p>eg <a href="https://developerjack.com/blog/2016/installing-php71-with-homebrew/" rel="noreferrer">https://developerjack.com/blog/2016/installing-php71-with-homebrew/</a></p>
  
  <p>I got error when I run "brew install php@7.1"</p>
  
  <p>macOS Catalina 10.15.4</p>
  
  <pre><code>executed
  brew install
  
  brew tap
  caskroom/cask
  homebrew/bundle
  homebrew/cask
  homebrew/core
  homebrew/services
  mongodb/brew
  
  brew -v
  Homebrew 2.2.12
  Homebrew/homebrew-core (git revision 53ccd; last commit 2020-04-08)
  Homebrew/homebrew-cask (git revision 322a2; last commit 2020-04-08)
  
  brew install php@7.1
  Updating Homebrew...
  ==&gt; Auto-updated Homebrew!
  Updated 1 tap (homebrew/core).
  No changes to formulae.
  
  Error: No available formula with the name "php@7.1" 
  ==&gt; Searching for a previously deleted formula (in the last month)...
  Warning: homebrew/core is shallow clone. To get complete history run:
    git -C "$(brew --repo homebrew/core)" fetch --unshallow
  
  Error: No previously deleted formula found.
  ==&gt; Searching for similarly named formulae...
  Error: No similarly named formulae found.
  ==&gt; Searching taps...
  ==&gt; Searching taps on GitHub...
  Error: No formulae found in taps.
  </code></pre>