I will show the outputs of some codes below.
composer clear-cache:
[root@xxx public_html]# composer clear-cache
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Cache directory does not exist (cache-vcs-dir):
Clearing cache (cache-repo-dir): /root/.cache/composer/repo
Clearing cache (cache-files-dir): /root/.cache/composer/files
Clearing cache (cache-dir): /root/.cache/composer
All caches cleared.
composer self-update:
[root@xxx public_html]# composer self-update
You are already using the latest available Composer version 2.2.18 (stable channel).
php -v:
[root@xxx public_html]# php -v
PHP 7.1.33 (cli) (built: Nov 22 2019 11:40:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33, Copyright (c) 1999-2018, by Zend Technologies