I upgraded PHP to version 7.0 on Ubuntu box. Running php -v
on shell would show it as version 7.0. But Apache was still using PHP 5.6. I tried various methods to update settings for Apache but nothing worked until I issued following commands:
sudo a2dismod php5.6
sudo a2enmod php7.0
sudo service apache2 restart