I've formatted my computer, install Homebrew and run brew install php && brew upgrade php, and after check my php version with php -v shows me 7.4 that's correct. But when I run phpinfo() in localhost, shows me php version is 7.1.
I have put paths to .bash_profile file like that
export PATH=/usr/local/Cellar/php/7.4.5_1/bin:$PATH
export PATH=/usr/local/Cellar/php/7.4.5_1/sbin:$PATH
php -v is true, php-fpm -v is true but apache shows me PHP Version 7.1.23
How can I fix this?