This is not a SuiteCRM issue, it’s a Web server/Linux configuration issue.
Note that you have two PHP’s, one for Web server (which SuiteCRM app uses) and one for Command-line, or CLI (which SuiteCRM cron jobs use).
You can try uninstalling the older PHP from your system, and check your web server config.
When you type “php -v” you get results from the CLI. To know your web server PHP version I suggest checking in SuiteCRM menus: Admin / Diagnostic / phpinfo.