A few weeks ago I used this tutorial to install PHP 7.3 on my Raspbian.
Fast forward to today, I was bashing my head because after 2 hours of messing around, I could have
exec() work from PHP CLI but not from the browser.
php -v from CLI correctly reported 7.3, so what gives?
After two hours I also decided to try
phpinfo() from the browser, and guess what, it was still using 7.0!
sudo a2dismod php7.0
sudo service apache2 restart
phpinfo() correctly reported 7.3 and I had my
exec() working as intended.