On my server I have multiple versions of PHP from 5 to 7.2, default is 7.0.
For using Flarum I use this medthod method :
cga@serveur:~$ which php
/usr/bin/php
cga@serveur:~$ php -v
PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.32-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
So I change the $PATH environment variable :
cga@serveur:~$ export PATH=/opt/plesk/php/7.1/bin:${PATH}
cga@serveur:~$ which php
/opt/plesk/php/7.1/bin/php
cga@serveur:~$ php -v
PHP 7.1.26 (cli) (built: Jan 11 2019 12:01:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.1, Copyright (c) 2002-2018, by ionCube Ltd.
with Zend OPcache v7.1.26, Copyright (c) 1999-2018, by Zend Technologies
cga@serveur:~$
Hope this method helps you.
Regards
Sorry for my english... I'm french