title: Adding IMAP to PHP 7.2 on OSX
body: <p>I'm using PHP 7.2 on OS X El Capitan, installed using Homebrew (of course). Now I'd like to use some IMAP functions from PHP's IMAP extension, but no matter what I search for, I can't find a way to add the extension on OSX.</p>
  
  <p>Some things I've tried... I have, of course, tried the most commonly recommended approach:</p>
  
  <pre><code>$ brew reinstall php --with-imap
  </code></pre>
  
  <p>Yet this fails, returning:</p>
  
  <pre><code>Warning: php: this formula has no --with-imap option so it will be ignored!
  </code></pre>
  
  <p>Another method, which I found mentioned in passing, also fails:</p>
  
  <pre><code>$ brew install php72-imap
  
  Error: No available formula with the name "php72-imap" 
  ==&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>
  
  <p>I'm not exactly sure which direction to go in with this. I'm sure there's an easy, probably documented, way of doing this, but I am yet to find it. Perhaps I'm just looking in the wrong places and using the wrong search terms...</p>