Based on your requirments you may need to use composer by running on special and different version. 

Our shared hosting support many PHP Version

/opt/cpanel/ea-php54

/opt/cpanel/ea-php55

/opt/cpanel/ea-php56

/opt/cpanel/ea-php70

/opt/cpanel/ea-php71

Login via ssh to your packages

Before you set anything without knowning first check which version is it using by typing

which composer

 alias composer='/opt/cpanel/ea-php56/root/usr/bin/php -d allow_url_fopen=1 -d detect_unicode=0 /opt/cpanel/composer/bin/composer'     /opt/cpanel/ea-php56/root/usr/bin/php 
The sentences

composer=*****

means that which php execution you are using so currently it is 56 if you want to switch to 7.1 then execute the cmmand and rewrite that alias with version that you want

Set Alias with php version that you want replace {xx} with version

alias composer='/opt/cpanel/ea-php{xx}/root/usr/bin/php -d allow_url_fopen=1 -d detect_unicode=0 /opt/cpanel/composer/bin/composer'

You can go wherever you want and use composer update or may install